pyresttest icon indicating copy to clipboard operation
pyresttest copied to clipboard

Getting variable binds from a file

Open hardyarora opened this issue 8 years ago • 4 comments

Is it possible to get variable_binds from a file?

hardyarora avatar Jan 25 '17 16:01 hardyarora

There seems to be a command line argument for this (--vars) but there is no documentation on how the binding works in the test configurations, or what exact format is expected in the YAML for variables passed to --vars. Is this ready for use, or still in progress? This is exactly what is needed for having one set of test configurations that can be used easily across multiple deployment stages (dev, staging, production).

mmadsen avatar Jun 10 '17 18:06 mmadsen

It's apparently supposed to be a YAML dictionary, but nothing I've tried is accepted. It would be nice with an example using this.

magthe avatar Mar 15 '18 07:03 magthe

I need to pass some dynamic variables to the YAML file through cli. I do not understand how to do it.

snigdhitha avatar Mar 15 '18 23:03 snigdhitha

Looking at the source it seems to use yaml.safe_load() and so you'd pass it a string, not a file?

I'm using something like this, where $adminpassword is set as an environment variable.

--vars="{\"adminpassword\": \"$adminpassword\"}"

joseph-cloudthing avatar Apr 04 '18 09:04 joseph-cloudthing