diff --git a/framework/python/src/api/api.py b/framework/python/src/api/api.py index ccab0652b..611ec167d 100644 --- a/framework/python/src/api/api.py +++ b/framework/python/src/api/api.py @@ -234,7 +234,16 @@ async def start_test_run(self, request: Request, response: Response): False, "Configured interfaces are not " + "ready for use. Ensure required interfaces " + "are connected.") - device.test_modules = body_json["device"]["test_modules"] + # UI doesn't send individual test configs so we need to + # merge these manually until the UI is updated to handle + # the full config file + for module_name, module_config in device.test_modules.items(): + # Check if the module exists in UI test modules + if module_name in body_json["device"]["test_modules"]: + # Merge the enabled state + module_config["enabled"] = body_json["device"]["test_modules"][module_name]["enabled"] + + LOGGER.info(f'Device config{device.test_modules}') LOGGER.info("Starting Testrun with device target " + f"{device.manufacturer} {device.model} with " + diff --git a/framework/python/src/net_orc/network_orchestrator.py b/framework/python/src/net_orc/network_orchestrator.py index 0f98df8d0..ed90fabbf 100644 --- a/framework/python/src/net_orc/network_orchestrator.py +++ b/framework/python/src/net_orc/network_orchestrator.py @@ -791,7 +791,6 @@ def network_adapters_checker(self, mgtt_client, topic): """Checks for changes in network adapters and sends a message to the frontend """ - LOGGER.debug('checking network adatpers...') try: adapters = self._session.detect_network_adapters_change() if adapters: diff --git a/modules/test/base/python/src/test_module.py b/modules/test/base/python/src/test_module.py index 00f74df82..a59a05239 100644 --- a/modules/test/base/python/src/test_module.py +++ b/modules/test/base/python/src/test_module.py @@ -115,9 +115,14 @@ def run_tests(self): LOGGER.error(e) else: LOGGER.info(f'Test {test["name"]} not implemented. Skipping') + test['result'] = 'Error' + test['description'] = 'This test could not be found' else: LOGGER.debug(f'Test {test["name"]} is disabled') + # To be added in v1.3.2 + # result = 'Disabled', 'This test is disabled and did not run' + if result is not None: # Compliant or non-compliant as a boolean only if isinstance(result, bool): diff --git a/modules/test/ntp/python/src/ntp_module.py b/modules/test/ntp/python/src/ntp_module.py index 453c992e6..d9d277534 100644 --- a/modules/test/ntp/python/src/ntp_module.py +++ b/modules/test/ntp/python/src/ntp_module.py @@ -233,12 +233,12 @@ def _ntp_network_ntp_support(self): result = False, 'Device has not sent any NTP requests' elif device_sends_ntp3 and device_sends_ntp4: result = False, ('Device sent NTPv3 and NTPv4 packets. ' + - 'NTPv3 is not allowed.') + 'NTPv3 is not allowed') elif device_sends_ntp3: result = False, ('Device sent NTPv3 packets. ' - 'NTPv3 is not allowed.') + 'NTPv3 is not allowed') elif device_sends_ntp4: - result = True, 'Device sent NTPv4 packets.' + result = True, 'Device sent NTPv4 packets' LOGGER.info(result[1]) return result