Merge "Add possiblity to use generator in environment config"
This commit is contained in:
commit
d5076501a0
|
@ -184,6 +184,17 @@ class BaseValidator(BaseTestCase):
|
||||||
"of type 'string', value path 'attributes -> key1 -> type'"):
|
"of type 'string', value path 'attributes -> key1 -> type'"):
|
||||||
self.validator.check_env_config_attrs()
|
self.validator.check_env_config_attrs()
|
||||||
|
|
||||||
|
def test_check_env_config_attrs_generator_value(self, utils_mock):
|
||||||
|
utils_mock.parse_yaml.return_value = {
|
||||||
|
'attributes': {
|
||||||
|
'key1': {
|
||||||
|
'type': 'hidden',
|
||||||
|
'label': '',
|
||||||
|
'value': {'generator': 'password'},
|
||||||
|
'weight': 1}}}
|
||||||
|
|
||||||
|
self.validator.check_env_config_attrs()
|
||||||
|
|
||||||
def test_check_env_config_attrs_restriction_fails(self, utils_mock):
|
def test_check_env_config_attrs_restriction_fails(self, utils_mock):
|
||||||
utils_mock.parse_yaml.return_value = {
|
utils_mock.parse_yaml.return_value = {
|
||||||
'attributes': {
|
'attributes': {
|
||||||
|
|
|
@ -169,7 +169,12 @@ class BaseSchema(object):
|
||||||
'properties': {
|
'properties': {
|
||||||
'type': {'type': 'string'},
|
'type': {'type': 'string'},
|
||||||
'weight': {'type': 'integer'},
|
'weight': {'type': 'integer'},
|
||||||
'value': {'type': ['string', 'boolean']},
|
'value': {'anyOf': [
|
||||||
|
{'type': 'string'},
|
||||||
|
{'type': 'boolean'},
|
||||||
|
{'type': 'object',
|
||||||
|
'properties': {'generator': {'type': 'string'}}}
|
||||||
|
]},
|
||||||
'label': {'type': 'string'},
|
'label': {'type': 'string'},
|
||||||
'restrictions': self.restrictions,
|
'restrictions': self.restrictions,
|
||||||
'values': {'type': 'array', 'items':
|
'values': {'type': 'array', 'items':
|
||||||
|
|
Loading…
Reference in New Issue