From dbbbdf9e987c5c177a3aed6dca2e6311f286ffe3 Mon Sep 17 00:00:00 2001 From: Carolina Lopes Date: Fri, 10 Nov 2023 18:32:19 +0000 Subject: [PATCH] Move chiptool test code under test_collections --- .coveragerc | 4 +- .vscode/settings.json | 1 + scripts/test-local.sh | 44 +++++++++---------- test_collections/python_tests | 2 +- .../sdk_tests/support/chip_tool/test_case.py | 4 +- .../sdk_tests/support/chip_tool/test_suite.py | 6 +-- .../support}/tests/chip_tool/__init__.py | 0 .../tests/chip_tool/test_chip_tool.py | 40 ++++++++++------- .../tests/chip_tool/test_docker_extension.py | 2 +- .../tests/chip_tool/test_test_suite.py | 6 +-- .../yaml_tests/test_sdk_yaml_collection.py | 0 .../tests/yaml_tests/test_test_case.py | 4 +- .../yaml_tests/test_test_declarations.py | 0 .../tests/yaml_tests/test_test_suite.py | 5 ++- .../tests/yaml_tests/test_yaml_folder.py | 0 .../tests/yaml_tests/test_yaml_parser.py | 4 +- .../tests/yaml_tests/test_yamls/.version | 0 .../UnitTest_TC_ACE_1_2_Manual.yaml | 0 .../UnitTest_TC_ACL_1_1_Automated.yaml | 0 .../UnitTest_TC_ACL_2_1_Automated.yaml | 0 .../UnitTest_TC_ACL_2_2_Semi_Automated.yaml | 0 .../UnitTest_TC_ACL_2_3_Incomplete.yaml | 0 .../test_yamls/UnitTest_TC_ACL_2_5_Manual.yml | 0 .../UnitTest_TC_BINFO_2_3_Simulated.yaml | 0 .../test_yamls/other_file_to_be_ignored.yaml | 0 .../support/yaml_tests/models/test_case.py | 10 ++--- .../support/yaml_tests/models/test_suite.py | 4 +- .../tctr_chip_tool_log_parsing.py | 4 +- 28 files changed, 76 insertions(+), 64 deletions(-) rename {app => test_collections/sdk_tests/support}/tests/chip_tool/__init__.py (100%) rename {app => test_collections/sdk_tests/support}/tests/chip_tool/test_chip_tool.py (98%) rename {app => test_collections/sdk_tests/support}/tests/chip_tool/test_docker_extension.py (100%) rename {app => test_collections/sdk_tests/support}/tests/chip_tool/test_test_suite.py (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_sdk_yaml_collection.py (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_test_case.py (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_test_declarations.py (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_test_suite.py (99%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_yaml_folder.py (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_yaml_parser.py (97%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_yamls/.version (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_yamls/UnitTest_TC_ACE_1_2_Manual.yaml (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_1_1_Automated.yaml (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_1_Automated.yaml (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_2_Semi_Automated.yaml (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_3_Incomplete.yaml (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_5_Manual.yml (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_yamls/UnitTest_TC_BINFO_2_3_Simulated.yaml (100%) rename {app => test_collections/sdk_tests/support}/tests/yaml_tests/test_yamls/other_file_to_be_ignored.yaml (100%) diff --git a/.coveragerc b/.coveragerc index f9c46c90..e4ccb195 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,2 +1,4 @@ [run] -omit = */app/tests/* +omit = + */app/tests/* + */test_collections/sdk_tests/support/tests/* diff --git a/.vscode/settings.json b/.vscode/settings.json index 70d48ca5..ee551557 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -35,6 +35,7 @@ "python.testing.pytestPath": "/usr/local/bin/pytest", "python.testing.pytestArgs": [ "app/tests", + "test_collections/sdk_tests/support/tests", "--no-cov" ], "python.linting.ignorePatterns": [ diff --git a/scripts/test-local.sh b/scripts/test-local.sh index e34a8e1a..b8697cf0 100755 --- a/scripts/test-local.sh +++ b/scripts/test-local.sh @@ -2,43 +2,39 @@ set -e set -x - # - # Copyright (c) 2023 Project CHIP Authors - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - - +# +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/bin/sh -for arg in "$@" -do +for arg in "$@"; do case $arg in - --run-platform-dependant) + --run-platform-dependant) RUN_ALL_TESTS=1 shift # Remove --run-all from processing ;; - *) + *) OTHER_ARGUMENTS+=("$1") shift # Remove generic argument from processing ;; esac done -if [[ $RUN_ALL_TESTS -eq 1 ]] -then +if [[ $RUN_ALL_TESTS -eq 1 ]]; then echo "Running all tests" - pytest --cov-config=.coveragerc --cov=app --cov=test_collections --cov-report=term-missing app/tests "${@}" + pytest --cov-config=.coveragerc --cov=app --cov=test_collections --cov-report=term-missing app/tests test_collections/sdk_tests/support/tests "${@}" else echo "Skipping platform dependant tests" - pytest --cov-config=.coveragerc --cov=app --cov=test_collections --cov-report=term-missing --ignore=app/tests/platform_dependent_tests app/tests "${@}" + pytest --cov-config=.coveragerc --cov=app --cov=test_collections --cov-report=term-missing --ignore=app/tests/platform_dependent_tests app/tests test_collections/sdk_tests/support/tests "${@}" fi diff --git a/test_collections/python_tests b/test_collections/python_tests index 49998e9f..3f265e76 160000 --- a/test_collections/python_tests +++ b/test_collections/python_tests @@ -1 +1 @@ -Subproject commit 49998e9f4da0dc60995a05917ef61ecec7c6f603 +Subproject commit 3f265e76ce13ce1b647281aad7e63d3109bb766a diff --git a/test_collections/sdk_tests/support/chip_tool/test_case.py b/test_collections/sdk_tests/support/chip_tool/test_case.py index e91047ee..960b7ad3 100644 --- a/test_collections/sdk_tests/support/chip_tool/test_case.py +++ b/test_collections/sdk_tests/support/chip_tool/test_case.py @@ -22,8 +22,6 @@ from matter_yamltests.hooks import TestParserHooks, TestRunnerHooks from matter_yamltests.parser import PostProcessResponseResult, TestStep -from test_collections.sdk_tests.support.chip_tool import ChipTool -from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType from app.models import TestStateEnum from app.models.test_case_execution import TestCaseExecution from app.test_engine.logger import CHIP_LOG_FORMAT, CHIPTOOL_LEVEL, test_engine_logger @@ -36,6 +34,8 @@ from app.user_prompt_support.uploaded_file_support import UploadFile from app.user_prompt_support.user_prompt_manager import user_prompt_manager from app.user_prompt_support.user_prompt_support import UserPromptSupport +from test_collections.sdk_tests.support.chip_tool import ChipTool +from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType CHIP_TOOL_DEFAULT_PROMPT_TIMEOUT_S = 60 # seconds OUTCOME_TIMEOUT_S = 60 * 10 # Seconds diff --git a/test_collections/sdk_tests/support/chip_tool/test_suite.py b/test_collections/sdk_tests/support/chip_tool/test_suite.py index 001e3306..03f0e47a 100644 --- a/test_collections/sdk_tests/support/chip_tool/test_suite.py +++ b/test_collections/sdk_tests/support/chip_tool/test_suite.py @@ -15,9 +15,6 @@ # from typing import Optional -from test_collections.sdk_tests.support.chip_tool import ChipTool -from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType -from test_collections.sdk_tests.support.chip_tool.test_case import PromptOption from app.models import TestSuiteExecution from app.otbr_manager.otbr_manager import ThreadBorderRouter from app.schemas.test_environment_config import ( @@ -29,6 +26,9 @@ from app.test_engine.models import TestSuite from app.user_prompt_support.prompt_request import OptionsSelectPromptRequest from app.user_prompt_support.user_prompt_support import UserPromptSupport +from test_collections.sdk_tests.support.chip_tool import ChipTool +from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType +from test_collections.sdk_tests.support.chip_tool.test_case import PromptOption CHIP_APP_PAIRING_CODE = "CHIP:SVR: Manual pairing code:" diff --git a/app/tests/chip_tool/__init__.py b/test_collections/sdk_tests/support/tests/chip_tool/__init__.py similarity index 100% rename from app/tests/chip_tool/__init__.py rename to test_collections/sdk_tests/support/tests/chip_tool/__init__.py diff --git a/app/tests/chip_tool/test_chip_tool.py b/test_collections/sdk_tests/support/tests/chip_tool/test_chip_tool.py similarity index 98% rename from app/tests/chip_tool/test_chip_tool.py rename to test_collections/sdk_tests/support/tests/chip_tool/test_chip_tool.py index 03576fba..30ecb21a 100644 --- a/app/tests/chip_tool/test_chip_tool.py +++ b/test_collections/sdk_tests/support/tests/chip_tool/test_chip_tool.py @@ -25,6 +25,11 @@ from matter_yamltests.parser_builder import TestParserBuilderConfig from matter_yamltests.runner import TestRunnerConfig +from app.container_manager import container_manager +from app.core.config import settings +from app.schemas.pics import PICSError +from app.tests.utils.docker import make_fake_container +from app.tests.utils.test_pics_data import create_random_pics from test_collections.sdk_tests.support.chip_tool import ChipTool from test_collections.sdk_tests.support.chip_tool.chip_tool import ( CHIP_APP_EXE, @@ -45,11 +50,6 @@ from test_collections.sdk_tests.support.chip_tool.exec_run_in_container import ( ExecResultExtended, ) -from app.container_manager import container_manager -from app.core.config import settings -from app.schemas.pics import PICSError -from app.tests.utils.docker import make_fake_container -from app.tests.utils.test_pics_data import create_random_pics @pytest.mark.asyncio @@ -65,7 +65,8 @@ async def test_start_container() -> None: ), mock.patch.object( target=container_manager, attribute="get_container", return_value=None ), mock.patch( - target="test_collections.sdk_tests.support.chip_tool.chip_tool.backend_container" + target="test_collections.sdk_tests.support.chip_tool.chip_tool." + "backend_container" ), mock.patch.object( target=container_manager, attribute="create_container" ) as mock_create_container, mock.patch.object( @@ -94,7 +95,8 @@ async def test_start_container_using_paa_certs() -> None: ), mock.patch.object( target=container_manager, attribute="get_container", return_value=None ), mock.patch( - target="test_collections.sdk_tests.support.chip_tool.chip_tool.backend_container" + target="test_collections.sdk_tests.support.chip_tool.chip_tool." + "backend_container" ), mock.patch.object( target=container_manager, attribute="create_container" ) as mock_create_container, mock.patch.object( @@ -395,7 +397,8 @@ async def test_destroy_container_once() -> None: ), mock.patch.object( target=container_manager, attribute="get_container", return_value=None ), mock.patch( - target="test_collections.sdk_tests.support.chip_tool.chip_tool.backend_container" + target="test_collections.sdk_tests.support.chip_tool.chip_tool." + "backend_container" ), mock.patch.object( target=container_manager, attribute="destroy" ) as mock_destroy, mock.patch.object( @@ -504,7 +507,8 @@ async def test_send_command_default_prefix() -> None: ), mock.patch.object( target=chip_tool, attribute="start_chip_server" ), mock.patch( - target="test_collections.sdk_tests.support.chip_tool.chip_tool.exec_run_in_container", + target="test_collections.sdk_tests.support.chip_tool.chip_tool." + "exec_run_in_container", return_value=mock_result, ) as mock_exec_run: await chip_tool.start_container(test_type) @@ -547,7 +551,8 @@ async def test_send_command_custom_prefix() -> None: ), mock.patch.object( target=chip_tool, attribute="start_chip_server" ), mock.patch( - target="test_collections.sdk_tests.support.chip_tool.chip_tool.exec_run_in_container", + target="test_collections.sdk_tests.support.chip_tool.chip_tool." + "exec_run_in_container", return_value=mock_result, ) as mock_exec_run: await chip_tool.start_container(test_type) @@ -588,7 +593,8 @@ async def test_run_test_default_config() -> None: ), mock.patch.object( target=chip_tool, attribute="start_chip_server" ), mock.patch( - target="test_collections.sdk_tests.support.chip_tool.chip_tool.WebSocketRunner.run", + target="test_collections.sdk_tests.support.chip_tool.chip_tool.WebSocketRunner." + "run", return_value=True, ) as mock_run: await chip_tool.start_container(test_type) @@ -642,7 +648,8 @@ async def test_run_test_custom_timeout() -> None: ), mock.patch.object( target=chip_tool, attribute="start_chip_server" ), mock.patch( - target="test_collections.sdk_tests.support.chip_tool.chip_tool.WebSocketRunner.run", + target="test_collections.sdk_tests.support.chip_tool.chip_tool.WebSocketRunner." + "run", return_value=True, ) as mock_run: await chip_tool.start_container(test_type) @@ -690,7 +697,8 @@ async def test_run_test_with_custom_parameter() -> None: ), mock.patch.object( target=chip_tool, attribute="start_chip_server" ), mock.patch( - target="test_collections.sdk_tests.support.chip_tool.chip_tool.WebSocketRunner.run", + target="test_collections.sdk_tests.support.chip_tool.chip_tool.WebSocketRunner." + "run", return_value=True, ) as mock_run: await chip_tool.start_container(test_type) @@ -739,7 +747,8 @@ async def test_run_test_with_endpoint_parameter() -> None: ), mock.patch.object( target=chip_tool, attribute="start_chip_server" ), mock.patch( - target="test_collections.sdk_tests.support.chip_tool.chip_tool.WebSocketRunner.run", + target="test_collections.sdk_tests.support.chip_tool.chip_tool.WebSocketRunner." + "run", return_value=True, ) as mock_run: await chip_tool.start_container(test_type) @@ -787,7 +796,8 @@ async def test_run_test_with_nodeID_and_cluster_parameters() -> None: ), mock.patch.object( target=chip_tool, attribute="start_chip_server" ), mock.patch( - target="test_collections.sdk_tests.support.chip_tool.chip_tool.WebSocketRunner.run", + target="test_collections.sdk_tests.support.chip_tool.chip_tool.WebSocketRunner." + "run", return_value=True, ) as mock_run: await chip_tool.start_container(test_type) diff --git a/app/tests/chip_tool/test_docker_extension.py b/test_collections/sdk_tests/support/tests/chip_tool/test_docker_extension.py similarity index 100% rename from app/tests/chip_tool/test_docker_extension.py rename to test_collections/sdk_tests/support/tests/chip_tool/test_docker_extension.py index cd546d3e..192f13ec 100644 --- a/app/tests/chip_tool/test_docker_extension.py +++ b/test_collections/sdk_tests/support/tests/chip_tool/test_docker_extension.py @@ -15,10 +15,10 @@ # from typing import Generator +from app.tests.utils.docker import make_fake_container from test_collections.sdk_tests.support.chip_tool.exec_run_in_container import ( exec_run_in_container, ) -from app.tests.utils.docker import make_fake_container def test_exec_run_in_container_not_stream() -> None: diff --git a/app/tests/chip_tool/test_test_suite.py b/test_collections/sdk_tests/support/tests/chip_tool/test_test_suite.py similarity index 100% rename from app/tests/chip_tool/test_test_suite.py rename to test_collections/sdk_tests/support/tests/chip_tool/test_test_suite.py index 3f5e1406..516a92c6 100644 --- a/app/tests/chip_tool/test_test_suite.py +++ b/test_collections/sdk_tests/support/tests/chip_tool/test_test_suite.py @@ -20,15 +20,15 @@ import pytest +from app.models.test_suite_execution import TestSuiteExecution +from app.user_prompt_support.constants import UserResponseStatusEnum +from app.user_prompt_support.prompt_response import PromptResponse from test_collections.sdk_tests.support.chip_tool.test_case import PromptOption from test_collections.sdk_tests.support.chip_tool.test_suite import ( ChipToolSuite, DUTCommissioningError, SuiteSetupError, ) -from app.models.test_suite_execution import TestSuiteExecution -from app.user_prompt_support.constants import UserResponseStatusEnum -from app.user_prompt_support.prompt_response import PromptResponse RETRY_PROMPT_RESPONSE = PromptResponse( response=PromptOption.RETRY, status_code=UserResponseStatusEnum.OKAY diff --git a/app/tests/yaml_tests/test_sdk_yaml_collection.py b/test_collections/sdk_tests/support/tests/yaml_tests/test_sdk_yaml_collection.py similarity index 100% rename from app/tests/yaml_tests/test_sdk_yaml_collection.py rename to test_collections/sdk_tests/support/tests/yaml_tests/test_sdk_yaml_collection.py diff --git a/app/tests/yaml_tests/test_test_case.py b/test_collections/sdk_tests/support/tests/yaml_tests/test_test_case.py similarity index 100% rename from app/tests/yaml_tests/test_test_case.py rename to test_collections/sdk_tests/support/tests/yaml_tests/test_test_case.py index cf5fd94f..e9a40047 100644 --- a/app/tests/yaml_tests/test_test_case.py +++ b/test_collections/sdk_tests/support/tests/yaml_tests/test_test_case.py @@ -19,11 +19,11 @@ import pytest -from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType -from test_collections.sdk_tests.support.chip_tool.test_case import TestError from app.models.test_case_execution import TestCaseExecution from app.test_engine.logger import test_engine_logger from app.test_engine.models.manual_test_case import ManualVerificationTestStep +from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType +from test_collections.sdk_tests.support.chip_tool.test_case import TestError from test_collections.sdk_tests.support.yaml_tests.models import YamlTestCase from test_collections.sdk_tests.support.yaml_tests.models.test_case import ( YamlChipToolTestCase, diff --git a/app/tests/yaml_tests/test_test_declarations.py b/test_collections/sdk_tests/support/tests/yaml_tests/test_test_declarations.py similarity index 100% rename from app/tests/yaml_tests/test_test_declarations.py rename to test_collections/sdk_tests/support/tests/yaml_tests/test_test_declarations.py diff --git a/app/tests/yaml_tests/test_test_suite.py b/test_collections/sdk_tests/support/tests/yaml_tests/test_test_suite.py similarity index 99% rename from app/tests/yaml_tests/test_test_suite.py rename to test_collections/sdk_tests/support/tests/yaml_tests/test_test_suite.py index 9179136e..7c804604 100644 --- a/app/tests/yaml_tests/test_test_suite.py +++ b/test_collections/sdk_tests/support/tests/yaml_tests/test_test_suite.py @@ -18,9 +18,9 @@ import pytest -from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType from app.models.test_suite_execution import TestSuiteExecution from app.test_engine.logger import test_engine_logger +from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType from test_collections.sdk_tests.support.yaml_tests.models.test_suite import ( ChipToolYamlTestSuite, ManualYamlTestSuite, @@ -159,7 +159,8 @@ async def test_chip_tool_suite_setup() -> None: "test_collections.sdk_tests.support.yaml_tests.models." "test_suite.YamlTestSuite.setup" ) as yaml_suite_setup, mock.patch( - "test_collections.sdk_tests.support.chip_tool.test_suite.ChipToolSuite.setup" + "test_collections.sdk_tests.support.chip_tool.test_suite.ChipToolSuite." + "setup" ) as chip_tool_suite_setup: await suite_instance.setup() yaml_suite_setup.assert_called_once() diff --git a/app/tests/yaml_tests/test_yaml_folder.py b/test_collections/sdk_tests/support/tests/yaml_tests/test_yaml_folder.py similarity index 100% rename from app/tests/yaml_tests/test_yaml_folder.py rename to test_collections/sdk_tests/support/tests/yaml_tests/test_yaml_folder.py diff --git a/app/tests/yaml_tests/test_yaml_parser.py b/test_collections/sdk_tests/support/tests/yaml_tests/test_yaml_parser.py similarity index 97% rename from app/tests/yaml_tests/test_yaml_parser.py rename to test_collections/sdk_tests/support/tests/yaml_tests/test_yaml_parser.py index 69be5216..d7f8626e 100644 --- a/app/tests/yaml_tests/test_yaml_parser.py +++ b/test_collections/sdk_tests/support/tests/yaml_tests/test_yaml_parser.py @@ -19,7 +19,9 @@ import pytest from pydantic.error_wrappers import ValidationError -from app.tests.yaml_tests.test_test_case import yaml_test_instance +from test_collections.sdk_tests.support.tests.yaml_tests.test_test_case import ( + yaml_test_instance, +) from test_collections.sdk_tests.support.yaml_tests.models.yaml_test_models import ( YamlTestStep, YamlTestType, diff --git a/app/tests/yaml_tests/test_yamls/.version b/test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/.version similarity index 100% rename from app/tests/yaml_tests/test_yamls/.version rename to test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/.version diff --git a/app/tests/yaml_tests/test_yamls/UnitTest_TC_ACE_1_2_Manual.yaml b/test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_ACE_1_2_Manual.yaml similarity index 100% rename from app/tests/yaml_tests/test_yamls/UnitTest_TC_ACE_1_2_Manual.yaml rename to test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_ACE_1_2_Manual.yaml diff --git a/app/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_1_1_Automated.yaml b/test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_1_1_Automated.yaml similarity index 100% rename from app/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_1_1_Automated.yaml rename to test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_1_1_Automated.yaml diff --git a/app/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_1_Automated.yaml b/test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_1_Automated.yaml similarity index 100% rename from app/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_1_Automated.yaml rename to test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_1_Automated.yaml diff --git a/app/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_2_Semi_Automated.yaml b/test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_2_Semi_Automated.yaml similarity index 100% rename from app/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_2_Semi_Automated.yaml rename to test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_2_Semi_Automated.yaml diff --git a/app/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_3_Incomplete.yaml b/test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_3_Incomplete.yaml similarity index 100% rename from app/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_3_Incomplete.yaml rename to test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_3_Incomplete.yaml diff --git a/app/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_5_Manual.yml b/test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_5_Manual.yml similarity index 100% rename from app/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_5_Manual.yml rename to test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_ACL_2_5_Manual.yml diff --git a/app/tests/yaml_tests/test_yamls/UnitTest_TC_BINFO_2_3_Simulated.yaml b/test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_BINFO_2_3_Simulated.yaml similarity index 100% rename from app/tests/yaml_tests/test_yamls/UnitTest_TC_BINFO_2_3_Simulated.yaml rename to test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/UnitTest_TC_BINFO_2_3_Simulated.yaml diff --git a/app/tests/yaml_tests/test_yamls/other_file_to_be_ignored.yaml b/test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/other_file_to_be_ignored.yaml similarity index 100% rename from app/tests/yaml_tests/test_yamls/other_file_to_be_ignored.yaml rename to test_collections/sdk_tests/support/tests/yaml_tests/test_yamls/other_file_to_be_ignored.yaml diff --git a/test_collections/sdk_tests/support/yaml_tests/models/test_case.py b/test_collections/sdk_tests/support/yaml_tests/models/test_case.py index a7f9411c..c0022b45 100644 --- a/test_collections/sdk_tests/support/yaml_tests/models/test_case.py +++ b/test_collections/sdk_tests/support/yaml_tests/models/test_case.py @@ -16,11 +16,6 @@ import re from typing import Any, Type, TypeVar -from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType -from test_collections.sdk_tests.support.chip_tool.test_case import ( - ChipToolManualPromptTest, - ChipToolTest, -) from app.test_engine.logger import test_engine_logger from app.test_engine.models import ( ManualTestCase, @@ -28,6 +23,11 @@ TestCase, TestStep, ) +from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType +from test_collections.sdk_tests.support.chip_tool.test_case import ( + ChipToolManualPromptTest, + ChipToolTest, +) from .yaml_test_models import YamlTest, YamlTestStep, YamlTestType diff --git a/test_collections/sdk_tests/support/yaml_tests/models/test_suite.py b/test_collections/sdk_tests/support/yaml_tests/models/test_suite.py index 68792911..f0b285c3 100644 --- a/test_collections/sdk_tests/support/yaml_tests/models/test_suite.py +++ b/test_collections/sdk_tests/support/yaml_tests/models/test_suite.py @@ -16,10 +16,10 @@ from enum import Enum from typing import Type, TypeVar -from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType -from test_collections.sdk_tests.support.chip_tool.test_suite import ChipToolSuite from app.test_engine.logger import test_engine_logger as logger from app.test_engine.models import TestSuite +from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType +from test_collections.sdk_tests.support.chip_tool.test_suite import ChipToolSuite class YamlTestSuiteFactoryError(Exception): diff --git a/test_collections/tool_unit_tests/test_suite_chip_tool/tctr_chip_tool_log_parsing/tctr_chip_tool_log_parsing.py b/test_collections/tool_unit_tests/test_suite_chip_tool/tctr_chip_tool_log_parsing/tctr_chip_tool_log_parsing.py index a08aa478..0cb085a9 100644 --- a/test_collections/tool_unit_tests/test_suite_chip_tool/tctr_chip_tool_log_parsing/tctr_chip_tool_log_parsing.py +++ b/test_collections/tool_unit_tests/test_suite_chip_tool/tctr_chip_tool_log_parsing/tctr_chip_tool_log_parsing.py @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType -from test_collections.sdk_tests.support.chip_tool.test_case import ChipToolTest from app.default_environment_config import default_environment_config from app.schemas.test_environment_config import TestEnvironmentConfig from app.test_engine.logger import test_engine_logger as logger from app.test_engine.models import TestStep +from test_collections.sdk_tests.support.chip_tool.chip_tool import ChipToolTestType +from test_collections.sdk_tests.support.chip_tool.test_case import ChipToolTest class TCTRChipToolLogParsing(ChipToolTest):