Skip to content
Snippets Groups Projects
Commit 39436a6b authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device component:

- testing CI pipeline, added log messages
parent 2799209f
No related branches found
No related tags found
2 merge requests!54Release 2.0.0,!43CI pipeline and multiple module fixes
...@@ -156,8 +156,8 @@ def test_device_emulated_configure( ...@@ -156,8 +156,8 @@ def test_device_emulated_configure(
for config_rule in device_data.device_config.config_rules for config_rule in device_data.device_config.config_rules
if config_rule.WhichOneof('config_rule') == 'custom' if config_rule.WhichOneof('config_rule') == 'custom'
] ]
#LOGGER.info('device_data.device_config.config_rules = \n{:s}'.format( LOGGER.info('device_data.device_config.config_rules = \n{:s}'.format(
# '\n'.join(['{:s} {:s} = {:s}'.format(*config_rule) for config_rule in config_rules]))) '\n'.join(['{:s} {:s} = {:s}'.format(*config_rule) for config_rule in config_rules])))
RESULTING_CONFIG_ENDPOINTS = {cr['custom']['resource_key']:cr for cr in copy.deepcopy(DEVICE_EMU_CONFIG_ENDPOINTS)} RESULTING_CONFIG_ENDPOINTS = {cr['custom']['resource_key']:cr for cr in copy.deepcopy(DEVICE_EMU_CONFIG_ENDPOINTS)}
for endpoint_cooked in DEVICE_EMU_ENDPOINTS_COOKED: for endpoint_cooked in DEVICE_EMU_ENDPOINTS_COOKED:
values = json.loads(RESULTING_CONFIG_ENDPOINTS[endpoint_cooked[0]]['custom']['resource_value']) values = json.loads(RESULTING_CONFIG_ENDPOINTS[endpoint_cooked[0]]['custom']['resource_value'])
...@@ -168,14 +168,14 @@ def test_device_emulated_configure( ...@@ -168,14 +168,14 @@ def test_device_emulated_configure(
config_rule = ( config_rule = (
ConfigActionEnum.Name(config_rule['action']), config_rule['custom']['resource_key'], ConfigActionEnum.Name(config_rule['action']), config_rule['custom']['resource_key'],
json.loads(json.dumps(config_rule['custom']['resource_value']))) json.loads(json.dumps(config_rule['custom']['resource_value'])))
#LOGGER.info('config_rule: {:s} {:s} = {:s}'.format(*config_rule)) LOGGER.info('A config_rule: {:s} {:s} = {:s}'.format(*config_rule))
assert config_rule in config_rules assert config_rule in config_rules
for config_rule in DEVICE_EMU_CONFIG_ADDRESSES: for config_rule in DEVICE_EMU_CONFIG_ADDRESSES:
assert 'custom' in config_rule assert 'custom' in config_rule
config_rule = ( config_rule = (
ConfigActionEnum.Name(config_rule['action']), config_rule['custom']['resource_key'], ConfigActionEnum.Name(config_rule['action']), config_rule['custom']['resource_key'],
json.loads(json.dumps(config_rule['custom']['resource_value']))) json.loads(json.dumps(config_rule['custom']['resource_value'])))
#LOGGER.info('config_rule: {:s} {:s} = {:s}'.format(*config_rule)) LOGGER.info('B config_rule: {:s} {:s} = {:s}'.format(*config_rule))
assert config_rule in config_rules assert config_rule in config_rules
# Try to reconfigure... # Try to reconfigure...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment