StackStorm / st2

StackStorm (aka "IFTTT for Ops") is event-driven automation for auto-remediation, incident responses, troubleshooting, deployments, and more for DevOps and SREs. Includes rules engine, workflow, 160 integration packs with 6000+ actions (see https://exchange.stackstorm.org) and ChatOps. Installer at https://docs.stackstorm.com/install/index.html
https://stackstorm.com/
Apache License 2.0
6.1k stars 746 forks source link

Add `ST2TESTS_SYSTEM_USER` env var to set `system_user.user` in tests #6242

Closed cognifloyd closed 2 months ago

cognifloyd commented 2 months ago

Adds a new env var for tests: ST2TESTS_SYSTEM_USER. When set, this will override system_user.user in st2 conf so that you can run tests on systems that do not have the stanley user. When running tests locally, use the following to set system user to the current user:

export ST2TESTS_SYSTEM_USER=$(id -un)

This follows the naming convention for test vars introduced in #5707 which introduced ST2TESTS_PARALLEL_SLOT.

These commits were extracted from my wip work in https://github.com/StackStorm/st2/pull/6202.