Commit 39436a6b authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device component:

- testing CI pipeline, added log messages
parent 2799209f
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -156,8 +156,8 @@ def test_device_emulated_configure(
        for config_rule in device_data.device_config.config_rules
        if config_rule.WhichOneof('config_rule') == 'custom'
    ]
    #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])))
    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])))
    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:
        values = json.loads(RESULTING_CONFIG_ENDPOINTS[endpoint_cooked[0]]['custom']['resource_value'])
@@ -168,14 +168,14 @@ def test_device_emulated_configure(
        config_rule = (
            ConfigActionEnum.Name(config_rule['action']), config_rule['custom']['resource_key'],
            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
    for config_rule in DEVICE_EMU_CONFIG_ADDRESSES:
        assert 'custom' in config_rule
        config_rule = (
            ConfigActionEnum.Name(config_rule['action']), config_rule['custom']['resource_key'],
            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

    # Try to reconfigure...