(POOLER-137) Support integer environment variables

This commit updates vmpooler to set configuration values received via environment variables to integer values when an integer value is expected. Without this change vmpooler does not support setting integer values via environment variables. Additionally, testing is added for configuring vmpooler via environment variables.

To support this testing the gem climate_control is added, which allows
for testing environment variables without those set variables leaking to
other tests.
This commit is contained in:
kirby@puppetlabs.com 2019-01-16 16:44:14 -08:00
parent a1704b239e
commit d94b14a4d8
5 changed files with 249 additions and 17 deletions

View file

@ -19,7 +19,7 @@ Provide the entire configuration as a blob of yaml. Individual parameters passed
Path to a the file to use when loading the vmpooler configuration. This is only evaluated if `VMPOOLER_CONFIG` has not been specified.
### DOMAIN\_NAME
### DOMAIN
If set, returns a top-level 'domain' JSON key in POST requests
(optional)
@ -103,7 +103,7 @@ Same as `vm_lifetime`, but applied if a valid authentication token is
included during the request.
(required)
### VM\_PREFIX
### PREFIX
If set, prefixes all created VMs with this string. This should include a separator.
(optional; default: '')