diff --git a/app/schemas/test_environment_config.py b/app/schemas/test_environment_config.py index 36b0f645..e1845422 100644 --- a/app/schemas/test_environment_config.py +++ b/app/schemas/test_environment_config.py @@ -36,6 +36,7 @@ class ThreadAutoConfig(BaseModel): otbr_docker_image: Optional[str] ba_host: Optional[str] = None ba_port: Optional[int] = None + operational_dataset_hex: Optional[str] = None class TestEnvironmentConfigError(Exception): diff --git a/test_collections/matter/sdk_tests/support/python_testing/models/utils.py b/test_collections/matter/sdk_tests/support/python_testing/models/utils.py index ae17770c..d0cb92b8 100644 --- a/test_collections/matter/sdk_tests/support/python_testing/models/utils.py +++ b/test_collections/matter/sdk_tests/support/python_testing/models/utils.py @@ -274,15 +274,18 @@ async def __thread_dataset_hex( if isinstance(thread_config, ThreadExternalConfig): hex_dataset = thread_config.operational_dataset_hex elif isinstance(thread_config, ThreadAutoConfig): - border_router: ThreadBorderRouter = ThreadBorderRouter() + if thread_config.operational_dataset_hex: + hex_dataset = thread_config.operational_dataset_hex + else: + border_router: ThreadBorderRouter = ThreadBorderRouter() - # Expecting false as the OTBR is started in the suite's setup. - # Either way, if true, we try to start and configure the container in case - # there's no OTBR application running. - if await border_router.start_device(thread_config): - await border_router.form_thread_topology() + # Expecting false as the OTBR is started in the suite's setup. + # Either way, if true, we try to start and configure the container in case + # there's no OTBR application running. + if await border_router.start_device(thread_config): + await border_router.form_thread_topology() - hex_dataset = border_router.active_dataset + hex_dataset = border_router.active_dataset return hex_dataset