fix: dictionary => structure
This commit is contained in:
parent
3d9f9b3fb4
commit
d03c084b60
29 changed files with 148 additions and 14 deletions
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
ROUGAIL_VAR1="string1"
|
||||||
|
ROUGAIL_VAR2="string1"
|
||||||
|
ROUGAIL_VAR3="string1"
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
ROUGAIL_VAR1="string1"
|
||||||
|
ROUGAIL_VAR2="string1"
|
||||||
|
ROUGAIL_VAR3="string1"
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_VAR1="string1"
|
||||||
|
ROUGAIL_VAR3="string1"
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1",
|
||||||
|
"var3": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1",
|
||||||
|
"var3": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": [
|
||||||
|
"variable \"leadership.follower\" (a follower) at index \"0\" is disabled, it will be ignored when loading from environment variable"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_LEADERSHIP.LEADER="string1,string2,string3"
|
||||||
|
ROUGAIL_LEADERSHIP.FOLLOWER="string1,string2,string3"
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_LEADERSHIP.LEADER="string1,string2,string3"
|
||||||
|
ROUGAIL_LEADERSHIP.FOLLOWER="string1,string2,string3"
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"leadership.leader": [
|
||||||
|
{
|
||||||
|
"leadership.leader": "string1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leadership.leader": "string2",
|
||||||
|
"leadership.follower": "string2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leadership.leader": "string3",
|
||||||
|
"leadership.follower": "string3"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"leadership.leader": [
|
||||||
|
{
|
||||||
|
"leadership.leader": "a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leadership.leader": "b",
|
||||||
|
"leadership.follower": "value"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
ROUGAIL.VAR1="string1"
|
||||||
|
ROUGAIL.VAR2="string1"
|
||||||
|
ROUGAIL.VAR3="string1"
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
ROUGAIL.VAR1="string1"
|
||||||
|
ROUGAIL.VAR2="string1"
|
||||||
|
ROUGAIL.VAR3="string1"
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL.VAR1="string1"
|
||||||
|
ROUGAIL.VAR3="string1"
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": "string1",
|
||||||
|
"rougail.var2": "string1",
|
||||||
|
"rougail.var3": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": "string1",
|
||||||
|
"rougail.var2": "string1",
|
||||||
|
"rougail.var3": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": [
|
||||||
|
"variable \"rougail.leadership.follower\" (a follower) at index \"0\" is disabled, it will be ignored when loading from environment variable"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL.LEADERSHIP.LEADER="string1,string2,string3"
|
||||||
|
ROUGAIL.LEADERSHIP.FOLLOWER="string1,string2,string3"
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL.LEADERSHIP.LEADER="string1,string2,string3"
|
||||||
|
ROUGAIL.LEADERSHIP.FOLLOWER="string1,string2,string3"
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"rougail.leadership.leader": [
|
||||||
|
{
|
||||||
|
"rougail.leadership.leader": "string1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rougail.leadership.leader": "string2",
|
||||||
|
"rougail.leadership.follower": "string2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rougail.leadership.leader": "string3",
|
||||||
|
"rougail.leadership.follower": "string3"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"rougail.leadership.leader": [
|
||||||
|
{
|
||||||
|
"rougail.leadership.leader": "a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rougail.leadership.leader": "b",
|
||||||
|
"rougail.leadership.follower": "value"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -33,7 +33,7 @@ def test_dir(request):
|
||||||
return request.param
|
return request.param
|
||||||
|
|
||||||
|
|
||||||
def _test_dictionaries(test_dir, namespace, ext, *, level, need_exclude=False):
|
def _test_structural_files(test_dir, namespace, ext, *, level, need_exclude=False):
|
||||||
rougailconfig = get_rougail_config(test_dir, namespace)
|
rougailconfig = get_rougail_config(test_dir, namespace)
|
||||||
if not rougailconfig:
|
if not rougailconfig:
|
||||||
return
|
return
|
||||||
|
|
@ -173,34 +173,34 @@ def convert_str(val):
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
|
|
||||||
def test_dictionaries_all(test_dir):
|
def test_structural_files_all(test_dir):
|
||||||
"tests the output"
|
"tests the output"
|
||||||
_test_dictionaries(test_dir, False, EXT, level='all')
|
_test_structural_files(test_dir, False, EXT, level='all')
|
||||||
|
|
||||||
|
|
||||||
def test_dictionaries_all_exclude(test_dir):
|
def test_structural_files_all_exclude(test_dir):
|
||||||
"tests the output"
|
"tests the output"
|
||||||
_test_dictionaries(test_dir, False, EXT, level='all', need_exclude=True)
|
_test_structural_files(test_dir, False, EXT, level='all', need_exclude=True)
|
||||||
|
|
||||||
|
|
||||||
def test_dictionaries_mandatories(test_dir):
|
def test_structural_files_mandatories(test_dir):
|
||||||
"tests the output"
|
"tests the output"
|
||||||
_test_dictionaries(test_dir, False, EXT, level='mandatories')
|
_test_structural_files(test_dir, False, EXT, level='mandatories')
|
||||||
|
|
||||||
|
|
||||||
def test_dictionaries_namespace_all(test_dir):
|
def test_structural_files_namespace_all(test_dir):
|
||||||
"tests the output"
|
"tests the output"
|
||||||
_test_dictionaries(test_dir, True, EXT, level='all')
|
_test_structural_files(test_dir, True, EXT, level='all')
|
||||||
|
|
||||||
|
|
||||||
def test_dictionaries_namespace_all_exclude(test_dir):
|
def test_structural_files_namespace_all_exclude(test_dir):
|
||||||
"tests the output"
|
"tests the output"
|
||||||
_test_dictionaries(test_dir, True, EXT, level='all', need_exclude=True)
|
_test_structural_files(test_dir, True, EXT, level='all', need_exclude=True)
|
||||||
|
|
||||||
|
|
||||||
def test_dictionaries_namespace_mandatories(test_dir):
|
def test_structural_files_namespace_mandatories(test_dir):
|
||||||
"tests the output"
|
"tests the output"
|
||||||
_test_dictionaries(test_dir, True, EXT, level='mandatories')
|
_test_structural_files(test_dir, True, EXT, level='mandatories')
|
||||||
|
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
@ -213,7 +213,7 @@ def test_file_error(request):
|
||||||
return request.param
|
return request.param
|
||||||
|
|
||||||
|
|
||||||
def test_dictionaries_error(test_file_error):
|
def test_structural_files_error(test_file_error):
|
||||||
rougailconfig = get_rougail_config(test_file_error.parent.parent / 'structure')
|
rougailconfig = get_rougail_config(test_file_error.parent.parent / 'structure')
|
||||||
##################################
|
##################################
|
||||||
rougailconfig['step.user_data'] = ['environment']
|
rougailconfig['step.user_data'] = ['environment']
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue