fix: improve rougail.user_datas method
This commit is contained in:
parent
c330de60e7
commit
e905b24c99
1245 changed files with 5627 additions and 224 deletions
52
src/rougail/user_data_environment/annotator.py
Normal file
52
src/rougail/user_data_environment/annotator.py
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
"""
|
||||||
|
Silique (https://www.silique.fr)
|
||||||
|
Copyright (C) 2024
|
||||||
|
|
||||||
|
distribued with GPL-2 or later license
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
"""
|
||||||
|
from rougail.error import DictConsistencyError
|
||||||
|
from rougail.annotator.variable import Walk
|
||||||
|
from .i18n import _
|
||||||
|
|
||||||
|
|
||||||
|
class Annotator(Walk):
|
||||||
|
"""Annotate for environment"""
|
||||||
|
|
||||||
|
level = 95
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
objectspace,
|
||||||
|
*args, # pylint: disable=unused-argument
|
||||||
|
) -> None:
|
||||||
|
if not objectspace.paths:
|
||||||
|
return
|
||||||
|
self.objectspace = objectspace
|
||||||
|
self.check_family()
|
||||||
|
self.check_variable()
|
||||||
|
|
||||||
|
def check_family(self):
|
||||||
|
for family in self.get_families():
|
||||||
|
if family.name != family.name.lower():
|
||||||
|
msg = _('family name must be a lowercase name when we want to use user data "environment", so "{0}" is invalid')
|
||||||
|
raise DictConsistencyError(msg.format(family.name), 200, family.xmlfiles)
|
||||||
|
|
||||||
|
def check_variable(self):
|
||||||
|
for variable in self.get_variables():
|
||||||
|
if variable.name != variable.name.lower():
|
||||||
|
msg = _('variable name must be a lowercase name when we want to use user data "environment", so "{0}" is invalid')
|
||||||
|
raise DictConsistencyError(msg.format(variable.name), 201, variable.xmlfiles)
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
"""
|
|
||||||
Cli code for Rougail-user-data-environment
|
|
||||||
|
|
||||||
Silique (https://www.silique.fr)
|
|
||||||
Copyright (C) 2024
|
|
||||||
|
|
||||||
distribued with GPL-2 or later license
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
"""
|
|
||||||
from .data import RougailUserDataEnvironment
|
|
||||||
|
|
||||||
|
|
||||||
def run(rougailconfig,
|
|
||||||
config,
|
|
||||||
user_datas,
|
|
||||||
):
|
|
||||||
RougailUserDataEnvironment(config,
|
|
||||||
user_datas=user_datas,
|
|
||||||
rougailconfig=rougailconfig,
|
|
||||||
).run()
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ('run',)
|
|
||||||
|
|
@ -21,27 +21,26 @@ along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
"""
|
"""
|
||||||
|
|
||||||
"rougail environment variable prefix"
|
|
||||||
rougail_environment_var = "ROUGAIL_"
|
|
||||||
|
|
||||||
|
|
||||||
def get_rougail_config(*,
|
def get_rougail_config(*,
|
||||||
backward_compatibility=True,
|
backward_compatibility=True,
|
||||||
) -> dict:
|
) -> dict:
|
||||||
options = """
|
options = """
|
||||||
environment:
|
environment:
|
||||||
description: Define value from the environment
|
description: Define values from the environment
|
||||||
disabled:
|
disabled:
|
||||||
type: jinja
|
|
||||||
jinja: |
|
jinja: |
|
||||||
{% if 'environment' not in step.user_data %}
|
{% if 'environment' not in step.user_data %}
|
||||||
disabled
|
disabled
|
||||||
{% endif %}
|
{% endif %}
|
||||||
mandatory:
|
default_environment_name:
|
||||||
description: Ask values only for mandatories variables without any value
|
description: Name of the default environment prefix
|
||||||
negative_description: Ask values all variables
|
default: rougail
|
||||||
alternative_name: envm
|
disabled:
|
||||||
default: false
|
jinja: |
|
||||||
|
{% if main_namespace %}
|
||||||
|
use namespaces
|
||||||
|
{% endif %}
|
||||||
"""
|
"""
|
||||||
return {'name': 'environment',
|
return {'name': 'environment',
|
||||||
'process': 'user data',
|
'process': 'user data',
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,7 @@ You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
"""
|
"""
|
||||||
from .helper import get_rougail_environment
|
import os
|
||||||
|
|
||||||
from rougail.object_model import CONVERT_OPTION
|
from rougail.object_model import CONVERT_OPTION
|
||||||
from rougail.config import RougailConfig
|
from rougail.config import RougailConfig
|
||||||
from tiramisu.error import ValueOptionError
|
from tiramisu.error import ValueOptionError
|
||||||
|
|
@ -29,7 +28,6 @@ class RougailUserDataEnvironment:
|
||||||
config: 'Config',
|
config: 'Config',
|
||||||
*,
|
*,
|
||||||
rougailconfig: RougailConfig=None,
|
rougailconfig: RougailConfig=None,
|
||||||
user_datas=None,
|
|
||||||
):
|
):
|
||||||
# this is the tiramisu config object
|
# this is the tiramisu config object
|
||||||
self.config = config
|
self.config = config
|
||||||
|
|
@ -40,68 +38,55 @@ class RougailUserDataEnvironment:
|
||||||
user_data.append('environment')
|
user_data.append('environment')
|
||||||
rougailconfig['step.user_data'] = user_data
|
rougailconfig['step.user_data'] = user_data
|
||||||
user_data = rougailconfig['step.user_data']
|
user_data = rougailconfig['step.user_data']
|
||||||
|
self.rougailconfig = rougailconfig
|
||||||
if 'environment' not in user_data:
|
if 'environment' not in user_data:
|
||||||
raise Exception('environment is not set in step.user_data')
|
raise Exception('environment is not set in step.user_data')
|
||||||
self.rougailconfig = rougailconfig
|
self.errors = []
|
||||||
if user_datas:
|
self.warnings = []
|
||||||
self.errors = user_datas['errors']
|
|
||||||
self.warnings = user_datas['warnings']
|
|
||||||
else:
|
|
||||||
self.errors = []
|
|
||||||
self.warnings = []
|
|
||||||
# bash environment variables (key/value pairs)
|
|
||||||
self.rougail_environment_vars = get_rougail_environment()
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.config.property.read_write()
|
values = self.parse()
|
||||||
self.parse(self.config.unrestraint)
|
return [{'source': 'environment',
|
||||||
self.config.property.read_only()
|
'errors': self.errors,
|
||||||
# about unused bash environment variables
|
'warnings': self.warnings,
|
||||||
if len(self.rougail_environment_vars):
|
'values': values,
|
||||||
unused_env_var_str = ", ".join(self.rougail_environment_vars.keys())
|
'options': {'multi_separator': ',',
|
||||||
self.warnings.append("the following rougail bash environment "
|
'needs_convert': True,
|
||||||
"variable(s) are not used : " + unused_env_var_str)
|
},
|
||||||
|
}]
|
||||||
|
|
||||||
def parse(self, config):
|
def parse(self):
|
||||||
for option in config:
|
variables = {}
|
||||||
if option.isoptiondescription():
|
found_ns = False
|
||||||
self.parse(option)
|
for option in self.config:
|
||||||
else:
|
if option.group_type() == "namespace":
|
||||||
# FIXME handle exceptions
|
found_ns = True
|
||||||
# try except
|
variables.update(get_rougail_environment(option.name()))
|
||||||
# ValueError suivant le type
|
if not found_ns:
|
||||||
# PropertyError -> hidden ou frozen...
|
if self.rougailconfig['main_namespace'] is None:
|
||||||
# pour les tests: mettre hidden à true dans le yaml
|
return get_rougail_environment(self.rougailconfig['environment.default_environment_name'])
|
||||||
# try:
|
return get_rougail_environment(self.rougailconfig['main_namespace'])
|
||||||
self.load_environment(option)
|
return variables
|
||||||
# except Exception as exc:
|
|
||||||
# print(exc)
|
|
||||||
|
|
||||||
def load_environment(self, option):
|
|
||||||
option_name = option.path()
|
|
||||||
# the bash variable are in upper case
|
|
||||||
option_name = option_name.upper()
|
|
||||||
# if the option is not in the bash environment, do nothing
|
|
||||||
if option_name not in self.rougail_environment_vars.keys():
|
|
||||||
return
|
|
||||||
# actually the rougail type **is not** the same thing as
|
|
||||||
# the tiramisu type, which is in `option.type`
|
|
||||||
option_type = option.information.get('type')
|
|
||||||
ismulti = option.ismulti()
|
|
||||||
# here we retrieve the type conversion function
|
|
||||||
# carefull, the coercion function 'func' could be None
|
|
||||||
# -> in this case, do nothing
|
|
||||||
type_obj = CONVERT_OPTION.get(option_type, {}).get("func")
|
|
||||||
option_bash_value = self.rougail_environment_vars.pop(option_name)
|
|
||||||
if ismulti:
|
|
||||||
# here we expect the bash option value of a multi to be coma separated:
|
|
||||||
option_bash_value = [opt.strip() for opt in option_bash_value.split(",")]
|
|
||||||
if type_obj:
|
|
||||||
option_bash_value = [type_obj(opt) for opt in option_bash_value]
|
|
||||||
elif type_obj:
|
|
||||||
option_bash_value = type_obj(option_bash_value)
|
|
||||||
try:
|
|
||||||
option.value.set(option_bash_value)
|
|
||||||
except Exception as exc:
|
|
||||||
print(exc)
|
|
||||||
|
|
||||||
|
def get_rougail_environment(namespace):
|
||||||
|
"""gets all the rougail environment variables and their values
|
||||||
|
|
||||||
|
:sample: {'VARINT': '5', 'VARNAME34': '58, 22', 'VARNAME2': 'tata',
|
||||||
|
'VARNAME1': 'titi', 'MYFAMILY.VARNAME3': 'spam'}
|
||||||
|
:returns: rougail environment variables as a key/value dict
|
||||||
|
"""
|
||||||
|
# first we look at all environment variables
|
||||||
|
all_envvar = os.environ
|
||||||
|
# then we filter the ROUGAIL_ environment variables
|
||||||
|
if namespace is None:
|
||||||
|
rougail_environment_var = rougail_default_environment_var.upper() + '_'
|
||||||
|
len_env = len(rougail_environment_var) + 1
|
||||||
|
root = ''
|
||||||
|
else:
|
||||||
|
rougail_environment_var = namespace.upper() + '_'
|
||||||
|
len_env = len(rougail_environment_var)
|
||||||
|
root = namespace.lower() + '.'
|
||||||
|
return {root + envvar[len_env:].lower(): envval
|
||||||
|
for envvar, envval in all_envvar.items()
|
||||||
|
if envvar.startswith(rougail_environment_var)}
|
||||||
|
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
"""
|
|
||||||
Helper file for Rougail-user-data-environment
|
|
||||||
|
|
||||||
Silique (https://www.silique.fr)
|
|
||||||
Copyright (C) 2024
|
|
||||||
|
|
||||||
distribued with GPL-2 or later license
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
"""
|
|
||||||
import os
|
|
||||||
|
|
||||||
from .config import rougail_environment_var
|
|
||||||
|
|
||||||
|
|
||||||
def get_rougail_environment():
|
|
||||||
"""gets all the rougail environment variables and their values
|
|
||||||
|
|
||||||
:sample: {'VARINT': '5', 'VARNAME34': '58, 22', 'VARNAME2': 'tata',
|
|
||||||
'VARNAME1': 'titi', 'MYFAMILY.VARNAME3': 'spam'}
|
|
||||||
:returns: rougail environment variables as a key/value dict
|
|
||||||
"""
|
|
||||||
# first we look at all environment variables
|
|
||||||
all_envvar = os.environ
|
|
||||||
# then we filter the ROUGAIL_ environment variables
|
|
||||||
rougail_envvar = [envvar.replace(rougail_environment_var, '')
|
|
||||||
for envvar in all_envvar
|
|
||||||
if envvar.startswith(rougail_environment_var)]
|
|
||||||
rougail_environment_dict = dict()
|
|
||||||
for var in rougail_envvar:
|
|
||||||
rougail_environment_dict[var] = os.environ[rougail_environment_var + var]
|
|
||||||
return rougail_environment_dict
|
|
||||||
4
tests/results/00_0empty/errors/all.json
Normal file
4
tests/results/00_0empty/errors/all.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
4
tests/results/00_0empty/errors/mandatories.json
Normal file
4
tests/results/00_0empty/errors/mandatories.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
1
tests/results/00_0empty/file/all.env
Normal file
1
tests/results/00_0empty/file/all.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
1
tests/results/00_0empty/file/all_exclude.env
Normal file
1
tests/results/00_0empty/file/all_exclude.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
1
tests/results/00_0empty/file/mandatories.env
Normal file
1
tests/results/00_0empty/file/mandatories.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
1
tests/results/00_0empty/makedict/all.json
Normal file
1
tests/results/00_0empty/makedict/all.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
||||||
1
tests/results/00_0empty/makedict/mandatories.json
Normal file
1
tests/results/00_0empty/makedict/mandatories.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
||||||
4
tests/results/00_0version_underscore/errors/all.json
Normal file
4
tests/results/00_0version_underscore/errors/all.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
1
tests/results/00_0version_underscore/file/all.env
Normal file
1
tests/results/00_0version_underscore/file/all.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_VERSION="string1"
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_VERSION="string1"
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_VERSION="string1"
|
||||||
3
tests/results/00_0version_underscore/makedict/all.json
Normal file
3
tests/results/00_0version_underscore/makedict/all.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rougail.version": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rougail.version": "string1"
|
||||||
|
}
|
||||||
4
tests/results/00_1empty_variable/errors/all.json
Normal file
4
tests/results/00_1empty_variable/errors/all.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
4
tests/results/00_1empty_variable/errors/mandatories.json
Normal file
4
tests/results/00_1empty_variable/errors/mandatories.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
1
tests/results/00_1empty_variable/file/all.env
Normal file
1
tests/results/00_1empty_variable/file/all.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_EMPTY="string1"
|
||||||
1
tests/results/00_1empty_variable/file/all_exclude.env
Normal file
1
tests/results/00_1empty_variable/file/all_exclude.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_EMPTY="string1"
|
||||||
1
tests/results/00_1empty_variable/file/mandatories.env
Normal file
1
tests/results/00_1empty_variable/file/mandatories.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_EMPTY="string1"
|
||||||
3
tests/results/00_1empty_variable/makedict/all.json
Normal file
3
tests/results/00_1empty_variable/makedict/all.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rougail.empty": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rougail.empty": "string1"
|
||||||
|
}
|
||||||
4
tests/results/00_2default_calculated/errors/all.json
Normal file
4
tests/results/00_2default_calculated/errors/all.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
2
tests/results/00_2default_calculated/file/all.env
Normal file
2
tests/results/00_2default_calculated/file/all.env
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_VAR1="string1"
|
||||||
|
ROUGAIL_VAR2="string1,string2,string3"
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_VAR1="string1"
|
||||||
|
ROUGAIL_VAR2="string1,string2,string3"
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
8
tests/results/00_2default_calculated/makedict/all.json
Normal file
8
tests/results/00_2default_calculated/makedict/all.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": "string1",
|
||||||
|
"rougail.var2": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": "no",
|
||||||
|
"rougail.var2": [
|
||||||
|
"no"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
2
tests/results/00_2default_calculated_multi/file/all.env
Normal file
2
tests/results/00_2default_calculated_multi/file/all.env
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_VAR1="string1,string2,string3"
|
||||||
|
ROUGAIL_VAR2="string1,string2,string3"
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_VAR1="string1,string2,string3"
|
||||||
|
ROUGAIL_VAR2="string1,string2,string3"
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
12
tests/results/00_2default_calculated_multi/makedict/all.json
Normal file
12
tests/results/00_2default_calculated_multi/makedict/all.json
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"rougail.var2": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": [
|
||||||
|
"no",
|
||||||
|
"yes",
|
||||||
|
"maybe"
|
||||||
|
],
|
||||||
|
"rougail.var2": [
|
||||||
|
"no",
|
||||||
|
"yes",
|
||||||
|
"maybe"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_VAR1="domain1.lan,domain2.lan"
|
||||||
|
ROUGAIL_VAR2="domain1.lan,domain2.lan"
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_VAR1="domain1.lan,domain2.lan"
|
||||||
|
ROUGAIL_VAR2="domain1.lan,domain2.lan"
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_VAR1="domain1.lan,domain2.lan"
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": [
|
||||||
|
"domain1.lan",
|
||||||
|
"domain2.lan"
|
||||||
|
],
|
||||||
|
"rougail.var2": [
|
||||||
|
"domain1.lan",
|
||||||
|
"domain2.lan"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": [
|
||||||
|
"domain1.lan",
|
||||||
|
"domain2.lan"
|
||||||
|
],
|
||||||
|
"rougail.var2": [
|
||||||
|
"domain1.lan",
|
||||||
|
"domain2.lan"
|
||||||
|
]
|
||||||
|
}
|
||||||
4
tests/results/00_4load_subfolder/errors/all.json
Normal file
4
tests/results/00_4load_subfolder/errors/all.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
4
tests/results/00_4load_subfolder/errors/mandatories.json
Normal file
4
tests/results/00_4load_subfolder/errors/mandatories.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
1
tests/results/00_4load_subfolder/file/all.env
Normal file
1
tests/results/00_4load_subfolder/file/all.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_VAR1="string1"
|
||||||
1
tests/results/00_4load_subfolder/file/all_exclude.env
Normal file
1
tests/results/00_4load_subfolder/file/all_exclude.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_VAR1="string1"
|
||||||
1
tests/results/00_4load_subfolder/file/mandatories.env
Normal file
1
tests/results/00_4load_subfolder/file/mandatories.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_VAR1="string1"
|
||||||
3
tests/results/00_4load_subfolder/makedict/all.json
Normal file
3
tests/results/00_4load_subfolder/makedict/all.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": "string1"
|
||||||
|
}
|
||||||
4
tests/results/00_5load_notype/errors/all.json
Normal file
4
tests/results/00_5load_notype/errors/all.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
4
tests/results/00_5load_notype/errors/mandatories.json
Normal file
4
tests/results/00_5load_notype/errors/mandatories.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
1
tests/results/00_5load_notype/file/all.env
Normal file
1
tests/results/00_5load_notype/file/all.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_WITHOUT_TYPE="string1"
|
||||||
1
tests/results/00_5load_notype/file/all_exclude.env
Normal file
1
tests/results/00_5load_notype/file/all_exclude.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_WITHOUT_TYPE="string1"
|
||||||
1
tests/results/00_5load_notype/file/mandatories.env
Normal file
1
tests/results/00_5load_notype/file/mandatories.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
3
tests/results/00_5load_notype/makedict/all.json
Normal file
3
tests/results/00_5load_notype/makedict/all.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rougail.without_type": "string1"
|
||||||
|
}
|
||||||
3
tests/results/00_5load_notype/makedict/mandatories.json
Normal file
3
tests/results/00_5load_notype/makedict/mandatories.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rougail.without_type": "non"
|
||||||
|
}
|
||||||
4
tests/results/00_6boolean/errors/all.json
Normal file
4
tests/results/00_6boolean/errors/all.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
4
tests/results/00_6boolean/errors/mandatories.json
Normal file
4
tests/results/00_6boolean/errors/mandatories.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
6
tests/results/00_6boolean/file/all.env
Normal file
6
tests/results/00_6boolean/file/all.env
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
ROUGAIL_VAR1="True"
|
||||||
|
ROUGAIL_VAR2="True"
|
||||||
|
ROUGAIL_VAR3="True"
|
||||||
|
ROUGAIL_VAR4="True"
|
||||||
|
ROUGAIL_VAR5="True"
|
||||||
|
ROUGAIL_VAR6="True"
|
||||||
6
tests/results/00_6boolean/file/all_exclude.env
Normal file
6
tests/results/00_6boolean/file/all_exclude.env
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
ROUGAIL_VAR1="True"
|
||||||
|
ROUGAIL_VAR2="True"
|
||||||
|
ROUGAIL_VAR3="True"
|
||||||
|
ROUGAIL_VAR4="True"
|
||||||
|
ROUGAIL_VAR5="True"
|
||||||
|
ROUGAIL_VAR6="True"
|
||||||
1
tests/results/00_6boolean/file/mandatories.env
Normal file
1
tests/results/00_6boolean/file/mandatories.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
8
tests/results/00_6boolean/makedict/all.json
Normal file
8
tests/results/00_6boolean/makedict/all.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": true,
|
||||||
|
"rougail.var2": true,
|
||||||
|
"rougail.var3": true,
|
||||||
|
"rougail.var4": true,
|
||||||
|
"rougail.var5": true,
|
||||||
|
"rougail.var6": true
|
||||||
|
}
|
||||||
8
tests/results/00_6boolean/makedict/mandatories.json
Normal file
8
tests/results/00_6boolean/makedict/mandatories.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": true,
|
||||||
|
"rougail.var2": true,
|
||||||
|
"rougail.var3": true,
|
||||||
|
"rougail.var4": false,
|
||||||
|
"rougail.var5": false,
|
||||||
|
"rougail.var6": false
|
||||||
|
}
|
||||||
4
tests/results/00_6boolean_no_mandatory/errors/all.json
Normal file
4
tests/results/00_6boolean_no_mandatory/errors/all.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
1
tests/results/00_6boolean_no_mandatory/file/all.env
Normal file
1
tests/results/00_6boolean_no_mandatory/file/all.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_VARIABLE="True"
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_VARIABLE="True"
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
3
tests/results/00_6boolean_no_mandatory/makedict/all.json
Normal file
3
tests/results/00_6boolean_no_mandatory/makedict/all.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rougail.variable": true
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rougail.variable": true
|
||||||
|
}
|
||||||
6
tests/results/00_6choice/errors/all.json
Normal file
6
tests/results/00_6choice/errors/all.json
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"errors": [
|
||||||
|
"\"1\" est une valeur invalide pour l'option \"rougail.var6 (the sixth variable)\" de type choice, seul \"1\", \"2\" et \"3\" sont autoris\u00e9es"
|
||||||
|
],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
4
tests/results/00_6choice/errors/mandatories.json
Normal file
4
tests/results/00_6choice/errors/mandatories.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
6
tests/results/00_6choice/file/all.env
Normal file
6
tests/results/00_6choice/file/all.env
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
ROUGAIL_VAR1="a"
|
||||||
|
ROUGAIL_VAR2="a"
|
||||||
|
ROUGAIL_VAR3="a"
|
||||||
|
ROUGAIL_VAR4=""
|
||||||
|
ROUGAIL_VAR5="a"
|
||||||
|
ROUGAIL_VAR6="1"
|
||||||
6
tests/results/00_6choice/file/all_exclude.env
Normal file
6
tests/results/00_6choice/file/all_exclude.env
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
ROUGAIL_VAR1="a"
|
||||||
|
ROUGAIL_VAR2="a"
|
||||||
|
ROUGAIL_VAR3="a"
|
||||||
|
ROUGAIL_VAR4=""
|
||||||
|
ROUGAIL_VAR5="a"
|
||||||
|
ROUGAIL_VAR6="1"
|
||||||
2
tests/results/00_6choice/file/mandatories.env
Normal file
2
tests/results/00_6choice/file/mandatories.env
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_VAR1="a"
|
||||||
|
ROUGAIL_VAR2="a"
|
||||||
8
tests/results/00_6choice/makedict/all.json
Normal file
8
tests/results/00_6choice/makedict/all.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": "a",
|
||||||
|
"rougail.var2": "a",
|
||||||
|
"rougail.var3": "a",
|
||||||
|
"rougail.var4": null,
|
||||||
|
"rougail.var5": "a",
|
||||||
|
"rougail.var6": 1
|
||||||
|
}
|
||||||
8
tests/results/00_6choice/makedict/mandatories.json
Normal file
8
tests/results/00_6choice/makedict/mandatories.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": "a",
|
||||||
|
"rougail.var2": "a",
|
||||||
|
"rougail.var3": null,
|
||||||
|
"rougail.var4": null,
|
||||||
|
"rougail.var5": "a",
|
||||||
|
"rougail.var6": 1
|
||||||
|
}
|
||||||
4
tests/results/00_6choice_variable/errors/all.json
Normal file
4
tests/results/00_6choice_variable/errors/all.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
2
tests/results/00_6choice_variable/file/all.env
Normal file
2
tests/results/00_6choice_variable/file/all.env
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_VAR1="string1,string2,string3"
|
||||||
|
ROUGAIL_VAR2="string1"
|
||||||
2
tests/results/00_6choice_variable/file/all_exclude.env
Normal file
2
tests/results/00_6choice_variable/file/all_exclude.env
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_VAR1="string1,string2,string3"
|
||||||
|
ROUGAIL_VAR2="string1"
|
||||||
1
tests/results/00_6choice_variable/file/mandatories.env
Normal file
1
tests/results/00_6choice_variable/file/mandatories.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
8
tests/results/00_6choice_variable/makedict/all.json
Normal file
8
tests/results/00_6choice_variable/makedict/all.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"rougail.var2": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"rougail.var1": [
|
||||||
|
"a",
|
||||||
|
"b",
|
||||||
|
"c"
|
||||||
|
],
|
||||||
|
"rougail.var2": "a"
|
||||||
|
}
|
||||||
4
tests/results/00_6custom/errors/all.json
Normal file
4
tests/results/00_6custom/errors/all.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
4
tests/results/00_6custom/errors/mandatories.json
Normal file
4
tests/results/00_6custom/errors/mandatories.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
2
tests/results/00_6custom/file/all.env
Normal file
2
tests/results/00_6custom/file/all.env
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_CUSTOM1="string1"
|
||||||
|
ROUGAIL_CUSTOM2="string1"
|
||||||
2
tests/results/00_6custom/file/all_exclude.env
Normal file
2
tests/results/00_6custom/file/all_exclude.env
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
ROUGAIL_CUSTOM1="string1"
|
||||||
|
ROUGAIL_CUSTOM2="string1"
|
||||||
1
tests/results/00_6custom/file/mandatories.env
Normal file
1
tests/results/00_6custom/file/mandatories.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_CUSTOM1="string1"
|
||||||
4
tests/results/00_6custom/makedict/all.json
Normal file
4
tests/results/00_6custom/makedict/all.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"rougail.custom1": "string1",
|
||||||
|
"rougail.custom2": "string1"
|
||||||
|
}
|
||||||
4
tests/results/00_6custom/makedict/mandatories.json
Normal file
4
tests/results/00_6custom/makedict/mandatories.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"rougail.custom1": "string1",
|
||||||
|
"rougail.custom2": "value"
|
||||||
|
}
|
||||||
4
tests/results/00_6domainname/errors/all.json
Normal file
4
tests/results/00_6domainname/errors/all.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
4
tests/results/00_6domainname/errors/mandatories.json
Normal file
4
tests/results/00_6domainname/errors/mandatories.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"errors": [],
|
||||||
|
"warnings": []
|
||||||
|
}
|
||||||
1
tests/results/00_6domainname/file/all.env
Normal file
1
tests/results/00_6domainname/file/all.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_VARIABLE="domain1.lan"
|
||||||
1
tests/results/00_6domainname/file/all_exclude.env
Normal file
1
tests/results/00_6domainname/file/all_exclude.env
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ROUGAIL_VARIABLE="domain1.lan"
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue