Passing unit config via env variables
Currently, if you don't want to hardcode password in the scenario configuration YAML, you can use --password cmdline parameter, which can be used to set password for all the units. It is not flexible enough as it should be possible to pass different passwords for different units.
The new solution should use environment variables like this: dbstress_${unit_name}_${property}=${value}.
Hi, I have made little different implementation for environment variables. Env vars refenrences are in config file like
unit_name: unit4 description: foo test query: select * from foobar_table uri: ${DB_URL} driver_class: ${DB_DRIVER} username: ${DB_USER} password: ${DB_PASSWD} parallel_connections: 10 repeats: 100 connection_timeout: 3000
If this meets requirements enough, maybe i can make pull request?
Hello,
the is close to what I wanted, but the problem is that this implementation does not allow different credentials for different units. For example, you cannot have unit1 with password foo and unit2 with password bar. Maybe such flexibility is not needed, though, and we would be fine with env vars like that.
Could you send a PR, please? I will take a look. I also think the env vars should be prefixed with DBSTRESS_. Thank you!