fix
This commit is contained in:
parent
9f31448134
commit
c330de60e7
3 changed files with 2 additions and 11 deletions
6
tests/envvars/00_6string/env/all.env
vendored
6
tests/envvars/00_6string/env/all.env
vendored
|
@ -1,6 +0,0 @@
|
||||||
ROUGAIL_VAR1="string1"
|
|
||||||
ROUGAIL_VAR2="string1"
|
|
||||||
ROUGAIL_VAR3="string1"
|
|
||||||
ROUGAIL_VAR4="string1"
|
|
||||||
ROUGAIL_VAR5="string1"
|
|
||||||
ROUGAIL_VAR6="string1"
|
|
3
tests/envvars/00_6string/env/mandatories.env
vendored
3
tests/envvars/00_6string/env/mandatories.env
vendored
|
@ -1,3 +0,0 @@
|
||||||
ROUGAIL_VAR1="string1"
|
|
||||||
ROUGAIL_VAR2="string1"
|
|
||||||
ROUGAIL_VAR3="string1"
|
|
|
@ -101,8 +101,6 @@ def populate(dest_dir, rougailconfig):
|
||||||
values = []
|
values = []
|
||||||
for variable in get_variables(root_config):
|
for variable in get_variables(root_config):
|
||||||
var = get_value(variable)
|
var = get_value(variable)
|
||||||
if var is None:
|
|
||||||
var = ""
|
|
||||||
values.append('ROUGAIL_' + variable.path().upper() + '="' + var + '"')
|
values.append('ROUGAIL_' + variable.path().upper() + '="' + var + '"')
|
||||||
if not environment_file.is_file():
|
if not environment_file.is_file():
|
||||||
with environment_file.open('w') as envfh:
|
with environment_file.open('w') as envfh:
|
||||||
|
@ -129,6 +127,8 @@ def get_value(variable):
|
||||||
tests = ['domain1.lan', 'domain2.lan']
|
tests = ['domain1.lan', 'domain2.lan']
|
||||||
elif variable.type() == 'choice':
|
elif variable.type() == 'choice':
|
||||||
tests = variable.value.list()
|
tests = variable.value.list()
|
||||||
|
if tests[0] == None:
|
||||||
|
tests[0] = ""
|
||||||
else:
|
else:
|
||||||
tests = ['string1', 'string2', 'string3']
|
tests = ['string1', 'string2', 'string3']
|
||||||
if not variable.ismulti() or (variable.isfollower() and variable.ismulti() is True):
|
if not variable.ismulti() or (variable.isfollower() and variable.ismulti() is True):
|
||||||
|
|
Loading…
Reference in a new issue