diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7912a1cb55..a697a8a2d3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -91,7 +91,7 @@ Changed * Move from udatetime to ciso8601 for date functionality ahead of supporting python3.9 #5692 Contributed by Amanda McGuinness (@amanda11 intive) -* Refactor tests to use python imports to identify test fixtures. #5699 +* Refactor tests to use python imports to identify test fixtures. #5699 #5702 Contributed by @cognifloyd Removed diff --git a/contrib/core/__init__.py b/contrib/core/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/contrib/core/fixture.py b/contrib/core/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/contrib/core/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/contrib/core/tests/test_action_sendmail.py b/contrib/core/tests/test_action_sendmail.py index e6837aa3ba..60b950a876 100644 --- a/contrib/core/tests/test_action_sendmail.py +++ b/contrib/core/tests/test_action_sendmail.py @@ -25,6 +25,7 @@ from st2common.constants import action as action_constants +from st2tests.fixtures.packs.core.fixture import PACK_NAME from st2tests.fixturesloader import FixturesLoader from st2tests.base import RunnerTestCase from st2tests.base import CleanDbTestCase @@ -38,6 +39,10 @@ MOCK_EXECUTION.id = "598dbf0c0640fd54bffc688b" HOSTNAME = socket.gethostname() +# we need the core pack to also be in st2tests.fixtures so we can use FixturesLoader() +# The PACK_NAME import tells pants to include that, so use the var here. +FIXTURE_PACK = "packs/" + PACK_NAME + class SendmailActionTestCase(RunnerTestCase, CleanDbTestCase, CleanFilesTestCase): """ @@ -237,11 +242,11 @@ def _run_action(self, action_parameters): parse the output email data. """ models = self.fixtures_loader.load_models( - fixtures_pack="packs/core", fixtures_dict={"actions": ["sendmail.yaml"]} + fixtures_pack=FIXTURE_PACK, fixtures_dict={"actions": ["sendmail.yaml"]} ) action_db = models["actions"]["sendmail.yaml"] entry_point = self.fixtures_loader.get_fixture_file_path_abs( - "packs/core", "actions", "send_mail/send_mail" + FIXTURE_PACK, "actions", "send_mail/send_mail" ) runner = self._get_runner(action_db, entry_point=entry_point) diff --git a/contrib/runners/action_chain_runner/tests/unit/test_actionchain_cancel.py b/contrib/runners/action_chain_runner/tests/unit/test_actionchain_cancel.py index dca88cf803..bf6ffdd47a 100644 --- a/contrib/runners/action_chain_runner/tests/unit/test_actionchain_cancel.py +++ b/contrib/runners/action_chain_runner/tests/unit/test_actionchain_cancel.py @@ -35,7 +35,11 @@ from st2common.transport.publishers import CUDPublisher from st2tests import ExecutionDbTestCase -from st2tests import fixturesloader +from st2tests.fixtures.packs.action_chain_tests.fixture import ( + PACK_NAME as TEST_PACK, + PACK_PATH as TEST_PACK_PATH, +) +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH from st2tests.mocks.liveaction import MockLiveActionPublisherNonBlocking from six.moves import range @@ -45,10 +49,7 @@ "actions": ["test_cancel.yaml", "test_cancel_with_subworkflow.yaml"], } -TEST_PACK = "action_chain_tests" -TEST_PACK_PATH = fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK - -PACKS = [TEST_PACK_PATH, fixturesloader.get_fixtures_packs_base_path() + "/core"] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] USERNAME = "stanley" diff --git a/contrib/runners/action_chain_runner/tests/unit/test_actionchain_notifications.py b/contrib/runners/action_chain_runner/tests/unit/test_actionchain_notifications.py index d74efa37f2..d3387cbbac 100644 --- a/contrib/runners/action_chain_runner/tests/unit/test_actionchain_notifications.py +++ b/contrib/runners/action_chain_runner/tests/unit/test_actionchain_notifications.py @@ -35,6 +35,11 @@ from st2common.transport.liveaction import LiveActionPublisher from st2common.transport.publishers import CUDPublisher +from st2tests.fixtures.packs.action_chain_tests.fixture import ( + PACK_NAME as TEST_PACK, + PACK_PATH as TEST_PACK_PATH, +) +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH from st2tests.mocks.liveaction import MockLiveActionPublisherNonBlocking @@ -60,10 +65,7 @@ def __init__(self, status=action_constants.LIVEACTION_STATUS_SUCCEEDED, result=" FIXTURES_PACK, "actionchains", "chain_with_notifications.yaml" ) -TEST_PACK = "action_chain_tests" -TEST_PACK_PATH = fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK - -PACKS = [TEST_PACK_PATH, fixturesloader.get_fixtures_packs_base_path() + "/core"] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] MOCK_NOTIFY = { "on-complete": { diff --git a/contrib/runners/action_chain_runner/tests/unit/test_actionchain_pause_resume.py b/contrib/runners/action_chain_runner/tests/unit/test_actionchain_pause_resume.py index 46f948d73a..e0dfecc4d6 100644 --- a/contrib/runners/action_chain_runner/tests/unit/test_actionchain_pause_resume.py +++ b/contrib/runners/action_chain_runner/tests/unit/test_actionchain_pause_resume.py @@ -37,7 +37,11 @@ from st2common.util import date as date_utils from st2tests import ExecutionDbTestCase -from st2tests import fixturesloader +from st2tests.fixtures.packs.action_chain_tests.fixture import ( + PACK_NAME as TEST_PACK, + PACK_PATH as TEST_PACK_PATH, +) +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH from st2tests.mocks.liveaction import MockLiveActionPublisherNonBlocking from six.moves import range @@ -67,10 +71,7 @@ ], } -TEST_PACK = "action_chain_tests" -TEST_PACK_PATH = fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK - -PACKS = [TEST_PACK_PATH, fixturesloader.get_fixtures_packs_base_path() + "/core"] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] USERNAME = "stanley" diff --git a/contrib/runners/orquesta_runner/tests/unit/test_basic.py b/contrib/runners/orquesta_runner/tests/unit/test_basic.py index 5f5c60a012..7c9351423a 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_basic.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_basic.py @@ -48,19 +48,13 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] @mock.patch.object( diff --git a/contrib/runners/orquesta_runner/tests/unit/test_cancel.py b/contrib/runners/orquesta_runner/tests/unit/test_cancel.py index 419ff72a0c..cdffd6949d 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_cancel.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_cancel.py @@ -42,19 +42,13 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] @mock.patch.object( diff --git a/contrib/runners/orquesta_runner/tests/unit/test_context.py b/contrib/runners/orquesta_runner/tests/unit/test_context.py index bce5a50873..d9e726d9a1 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_context.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_context.py @@ -41,18 +41,12 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] @mock.patch.object( diff --git a/contrib/runners/orquesta_runner/tests/unit/test_data_flow.py b/contrib/runners/orquesta_runner/tests/unit/test_data_flow.py index dcf06c8923..7679d4e82c 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_data_flow.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_data_flow.py @@ -47,19 +47,13 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] TEST_1 = "xyz" TEST_2 = "床前明月光 疑是地上霜 舉頭望明月 低頭思故鄉" diff --git a/contrib/runners/orquesta_runner/tests/unit/test_delay.py b/contrib/runners/orquesta_runner/tests/unit/test_delay.py index d2535c8f03..2ac8df69b9 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_delay.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_delay.py @@ -40,19 +40,13 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] @mock.patch.object( diff --git a/contrib/runners/orquesta_runner/tests/unit/test_error_handling.py b/contrib/runners/orquesta_runner/tests/unit/test_error_handling.py index 436fe38fea..fb6d38ade1 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_error_handling.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_error_handling.py @@ -43,6 +43,8 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport from st2common.models.db.workflow import WorkflowExecutionDB @@ -50,15 +52,7 @@ from st2common.models.db.execution_queue import ActionExecutionSchedulingQueueItemDB -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] RUNNER_RESULT_FAILED = ( ac_const.LIVEACTION_STATUS_FAILED, diff --git a/contrib/runners/orquesta_runner/tests/unit/test_functions_common.py b/contrib/runners/orquesta_runner/tests/unit/test_functions_common.py index faa92bd03a..4019f9a890 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_functions_common.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_functions_common.py @@ -41,19 +41,13 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] @mock.patch.object( diff --git a/contrib/runners/orquesta_runner/tests/unit/test_functions_task.py b/contrib/runners/orquesta_runner/tests/unit/test_functions_task.py index 46ffb861e3..b325839c9d 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_functions_task.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_functions_task.py @@ -40,19 +40,13 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] @mock.patch.object( diff --git a/contrib/runners/orquesta_runner/tests/unit/test_inquiries.py b/contrib/runners/orquesta_runner/tests/unit/test_inquiries.py index 8dfdf24a84..f60f9415e8 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_inquiries.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_inquiries.py @@ -42,19 +42,13 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] @mock.patch.object( diff --git a/contrib/runners/orquesta_runner/tests/unit/test_notify.py b/contrib/runners/orquesta_runner/tests/unit/test_notify.py index c1e7935de9..ff7114a318 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_notify.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_notify.py @@ -44,19 +44,13 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import execution as mock_ac_ex_xport from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] MOCK_NOTIFY = { "on-complete": { diff --git a/contrib/runners/orquesta_runner/tests/unit/test_output_schema.py b/contrib/runners/orquesta_runner/tests/unit/test_output_schema.py index f23084b527..fcf685af84 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_output_schema.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_output_schema.py @@ -40,21 +40,15 @@ from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers from st2common.constants import action as ac_const +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport from st2tests.base import RunnerTestCase BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] FAIL_SCHEMA = { "notvalid": { diff --git a/contrib/runners/orquesta_runner/tests/unit/test_pause_and_resume.py b/contrib/runners/orquesta_runner/tests/unit/test_pause_and_resume.py index 984887b907..7473d9db8e 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_pause_and_resume.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_pause_and_resume.py @@ -43,19 +43,13 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] @mock.patch.object( diff --git a/contrib/runners/orquesta_runner/tests/unit/test_policies.py b/contrib/runners/orquesta_runner/tests/unit/test_policies.py index c8b836c53d..641a9d7823 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_policies.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_policies.py @@ -44,19 +44,16 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import ( + PACK_NAME as TEST_PACK, + PACK_PATH as TEST_PACK_PATH, +) from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] RUNNER_RESULT_FAILED = (ac_const.LIVEACTION_STATUS_FAILED, {"stderror": "..."}, {}) diff --git a/contrib/runners/orquesta_runner/tests/unit/test_rerun.py b/contrib/runners/orquesta_runner/tests/unit/test_rerun.py index ca972f2d2d..420b909e27 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_rerun.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_rerun.py @@ -37,19 +37,13 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] RUNNER_RESULT_FAILED = ( action_constants.LIVEACTION_STATUS_FAILED, diff --git a/contrib/runners/orquesta_runner/tests/unit/test_with_items.py b/contrib/runners/orquesta_runner/tests/unit/test_with_items.py index 6e16b7255d..8e8b67bd94 100644 --- a/contrib/runners/orquesta_runner/tests/unit/test_with_items.py +++ b/contrib/runners/orquesta_runner/tests/unit/test_with_items.py @@ -46,19 +46,13 @@ from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers from st2common.util import action_db as action_utils +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] RUNNER_RESULT_RUNNING = ( action_constants.LIVEACTION_STATUS_RUNNING, diff --git a/contrib/runners/python_runner/tests/integration/test_pythonrunner_behavior.py b/contrib/runners/python_runner/tests/integration/test_pythonrunner_behavior.py index 38441933b2..a749ef93b8 100644 --- a/contrib/runners/python_runner/tests/integration/test_pythonrunner_behavior.py +++ b/contrib/runners/python_runner/tests/integration/test_pythonrunner_behavior.py @@ -32,10 +32,14 @@ from st2tests import config from st2tests.base import CleanFilesTestCase from st2tests.base import CleanDbTestCase +from st2tests.fixtures.packs.test_library_dependencies.fixture import ( + PACK_NAME as TEST_LIBRARY_DEPENDENCIES, +) from st2tests.fixturesloader import get_fixtures_base_path __all__ = ["PythonRunnerBehaviorTestCase"] +FIXTURES_BASE_PATH = get_fixtures_base_path() BASE_DIR = os.path.dirname(os.path.abspath(__file__)) WRAPPER_SCRIPT_PATH = os.path.join( BASE_DIR, "../../../python_runner/python_runner/python_action_wrapper.py" @@ -72,7 +76,7 @@ def test_priority_of_loading_library_after_setup_pack_virtualenv(self): To test above, this uses 'get_library_path.py' action in 'test_library_dependencies' pack. This action returns file-path of imported module which is specified by 'module' parameter. """ - pack_name = "test_library_dependencies" + pack_name = TEST_LIBRARY_DEPENDENCIES # Before calling action, this sets up virtualenv for test pack. This pack has # requirements.txt wihch only writes 'six' module. @@ -123,7 +127,7 @@ def _run_action(self, pack, action, params, runner_params={}): setattr(runner, key, value) runner.entry_point = os.path.join( - get_fixtures_base_path(), "packs/%s/actions/%s" % (pack, action) + FIXTURES_BASE_PATH, f"packs/{pack}/actions/{action}" ) runner.pre_run() return runner.run(params) diff --git a/st2actions/tests/unit/test_output_schema.py b/st2actions/tests/unit/test_output_schema.py index 8a91e9cb4d..a66f9ffb12 100644 --- a/st2actions/tests/unit/test_output_schema.py +++ b/st2actions/tests/unit/test_output_schema.py @@ -38,11 +38,14 @@ from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.fixtures.packs.dummy_pack_1.fixture import PACK_PATH as DUMMY_PACK_1_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import ( + PACK_PATH as ORQUESTA_TESTS_PACK_PATH, +) PACKS = [ DUMMY_PACK_1_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/orquesta_tests", + ORQUESTA_TESTS_PACK_PATH, ] MOCK_PYTHON_ACTION_RESULT = { diff --git a/st2actions/tests/unit/test_queue_consumers.py b/st2actions/tests/unit/test_queue_consumers.py index 80d3a09c26..0ddfaea164 100644 --- a/st2actions/tests/unit/test_queue_consumers.py +++ b/st2actions/tests/unit/test_queue_consumers.py @@ -15,8 +15,6 @@ from __future__ import absolute_import -import st2tests - import st2tests.config as tests_config tests_config.parse_args() @@ -38,9 +36,10 @@ from st2common.util import action_db as action_utils from st2common.util import date as date_utils from st2tests.base import ExecutionDbTestCase +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH -PACKS = [st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core"] +PACKS = [CORE_PACK_PATH] @mock.patch.object(PoolPublisher, "publish", mock.MagicMock()) diff --git a/st2actions/tests/unit/test_workflow_engine.py b/st2actions/tests/unit/test_workflow_engine.py index a2090a2530..e4729798fe 100644 --- a/st2actions/tests/unit/test_workflow_engine.py +++ b/st2actions/tests/unit/test_workflow_engine.py @@ -43,19 +43,13 @@ from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers from st2reactor.garbage_collector import base as garbage_collector +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] @mock.patch.object( diff --git a/st2api/tests/unit/controllers/v1/test_packs.py b/st2api/tests/unit/controllers/v1/test_packs.py index 7de148d9f1..5b89d67361 100644 --- a/st2api/tests/unit/controllers/v1/test_packs.py +++ b/st2api/tests/unit/controllers/v1/test_packs.py @@ -38,6 +38,9 @@ PACK_NAME as DUMMY_PACK_10, PACK_PATH as DUMMY_PACK_10_PATH, ) +from st2tests.fixtures.packs.dummy_pack_15.fixture import ( + PACK_NAME as DUMMY_PACK_15, +) __all__ = ["PacksControllerTestCase"] @@ -669,7 +672,7 @@ def test_packs_register_endpoint(self, mock_get_packs): # Fail on failure (broken action metadata) resp = self.app.post_json( - "/v1/packs/register", {"packs": ["dummy_pack_15"]}, expect_errors=True + "/v1/packs/register", {"packs": [DUMMY_PACK_15]}, expect_errors=True ) expected_msg = "Failed to register action" diff --git a/st2api/tests/unit/controllers/v1/test_workflow_inspection.py b/st2api/tests/unit/controllers/v1/test_workflow_inspection.py index 91e251fe9d..3dc36acb01 100644 --- a/st2api/tests/unit/controllers/v1/test_workflow_inspection.py +++ b/st2api/tests/unit/controllers/v1/test_workflow_inspection.py @@ -20,16 +20,11 @@ import st2tests from st2tests.api import FunctionalTest +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] class WorkflowInspectionControllerTest(FunctionalTest, st2tests.WorkflowTestCase): diff --git a/st2common/tests/integration/test_register_content_script.py b/st2common/tests/integration/test_register_content_script.py index 8ec089c8eb..1c16d9e468 100644 --- a/st2common/tests/integration/test_register_content_script.py +++ b/st2common/tests/integration/test_register_content_script.py @@ -23,7 +23,10 @@ from st2common.util.shell import run_command from st2tests import config as test_config from st2tests.fixturesloader import get_fixtures_packs_base_path + +# import this so that pants can infer dependencies for the glob below from st2tests.fixtures.packs.dummy_pack_1.fixture import PACK_PATH as DUMMY_PACK_1_PATH +from st2tests.fixtures.packs.dummy_pack_4.fixture import PACK_PATH as DUMMY_PACK_4_PATH BASE_DIR = os.path.dirname(os.path.abspath(__file__)) @@ -83,7 +86,7 @@ def test_register_from_pack_fail_on_failure_pack_dir_doesnt_exist(self): def test_register_from_pack_action_metadata_fails_validation(self): # No fail on failure flag, should succeed - pack_dir = os.path.join(get_fixtures_packs_base_path(), "dummy_pack_4") + pack_dir = DUMMY_PACK_4_PATH runner_dirs = os.path.join(get_fixtures_packs_base_path(), "runners") opts = [ @@ -98,7 +101,7 @@ def test_register_from_pack_action_metadata_fails_validation(self): self.assertEqual(exit_code, 0) # Fail on failure, should fail - pack_dir = os.path.join(get_fixtures_packs_base_path(), "dummy_pack_4") + pack_dir = DUMMY_PACK_4_PATH opts = [ "--register-pack=%s" % (pack_dir), "--register-fail-on-failure", diff --git a/st2common/tests/unit/services/test_packs.py b/st2common/tests/unit/services/test_packs.py index 07d08ff7da..e93258aa0b 100644 --- a/st2common/tests/unit/services/test_packs.py +++ b/st2common/tests/unit/services/test_packs.py @@ -23,8 +23,6 @@ import unittest2 import uuid -import st2tests - from st2common.models.db.stormbase import UIDFieldMixin from st2common.services.packs import delete_action_files_from_pack from st2common.services.packs import clone_action_files @@ -33,18 +31,17 @@ from st2common.services.packs import restore_temp_action_files from st2common.services.packs import remove_temp_action_files -TEST_PACK = "dummy_pack_1" -TEST_PACK_PATH = os.path.join( - st2tests.fixturesloader.get_fixtures_packs_base_path(), TEST_PACK +from st2tests.fixtures.packs.core.fixture import PACK_NAME as TEST_SOURCE_PACK +from st2tests.fixtures.packs.dummy_pack_1.fixture import ( + PACK_NAME as TEST_PACK, + PACK_PATH as TEST_PACK_PATH, ) - -TEST_SOURCE_PACK = "core" - -TEST_SOURCE_WORKFLOW_PACK = "orquesta_tests" - -TEST_DEST_PACK = "dummy_pack_23" -TEST_DEST_PACK_PATH = os.path.join( - st2tests.fixturesloader.get_fixtures_packs_base_path(), TEST_DEST_PACK +from st2tests.fixtures.packs.dummy_pack_23.fixture import ( + PACK_NAME as TEST_DEST_PACK, + PACK_PATH as TEST_DEST_PACK_PATH, +) +from st2tests.fixtures.packs.orquesta_tests.fixture import ( + PACK_NAME as TEST_SOURCE_WORKFLOW_PACK, ) SOURCE_ACTION_WITH_PYTHON_SCRIPT_RUNNER = { diff --git a/st2common/tests/unit/services/test_workflow.py b/st2common/tests/unit/services/test_workflow.py index 23bd4aca60..11b082f092 100644 --- a/st2common/tests/unit/services/test_workflow.py +++ b/st2common/tests/unit/services/test_workflow.py @@ -41,22 +41,15 @@ from st2common.services import workflows as workflow_service from st2common.transport import liveaction as lv_ac_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - PACK_7 = "dummy_pack_7" PACK_7_PATH = st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + PACK_7 -PACKS = [ - TEST_PACK_PATH, - PACK_7_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, PACK_7_PATH, CORE_PACK_PATH] @mock.patch.object( diff --git a/st2common/tests/unit/services/test_workflow_cancellation.py b/st2common/tests/unit/services/test_workflow_cancellation.py index 22694924a3..d8b7b2206f 100644 --- a/st2common/tests/unit/services/test_workflow_cancellation.py +++ b/st2common/tests/unit/services/test_workflow_cancellation.py @@ -32,6 +32,8 @@ from st2common.services import workflows as wf_svc from st2common.transport import liveaction as lv_ac_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport @@ -40,15 +42,7 @@ "actions": ["sequential.yaml", "join.yaml"], } -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] @mock.patch.object( diff --git a/st2common/tests/unit/services/test_workflow_identify_orphans.py b/st2common/tests/unit/services/test_workflow_identify_orphans.py index 306e22badd..7110b509c9 100644 --- a/st2common/tests/unit/services/test_workflow_identify_orphans.py +++ b/st2common/tests/unit/services/test_workflow_identify_orphans.py @@ -43,21 +43,15 @@ from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers from st2common.util import date as date_utils +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport LOG = logging.getLogger(__name__) -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] @mock.patch.object( diff --git a/st2common/tests/unit/services/test_workflow_rerun.py b/st2common/tests/unit/services/test_workflow_rerun.py index f5ff2bc487..1fb10ace6f 100644 --- a/st2common/tests/unit/services/test_workflow_rerun.py +++ b/st2common/tests/unit/services/test_workflow_rerun.py @@ -40,18 +40,12 @@ from st2common.services import workflows as workflow_service from st2common.transport import liveaction as lv_ac_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] RUNNER_RESULT_FAILED = (action_constants.LIVEACTION_STATUS_FAILED, {}, {}) RUNNER_RESULT_SUCCEEDED = ( diff --git a/st2common/tests/unit/services/test_workflow_service_retries.py b/st2common/tests/unit/services/test_workflow_service_retries.py index 0d6edc9cc9..0e322fe573 100644 --- a/st2common/tests/unit/services/test_workflow_service_retries.py +++ b/st2common/tests/unit/services/test_workflow_service_retries.py @@ -51,19 +51,13 @@ from st2common.transport import liveaction as lv_ac_xport from st2common.transport import workflow as wf_ex_xport from st2common.transport import publishers +from st2tests.fixtures.packs.core.fixture import PACK_PATH as CORE_PACK_PATH +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_PATH as TEST_PACK_PATH from st2tests.mocks import liveaction as mock_lv_ac_xport from st2tests.mocks import workflow as mock_wf_ex_xport -TEST_PACK = "orquesta_tests" -TEST_PACK_PATH = ( - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/" + TEST_PACK -) - -PACKS = [ - TEST_PACK_PATH, - st2tests.fixturesloader.get_fixtures_packs_base_path() + "/core", -] +PACKS = [TEST_PACK_PATH, CORE_PACK_PATH] # Temporary directory used by the tests. diff --git a/st2common/tests/unit/test_config_loader.py b/st2common/tests/unit/test_config_loader.py index 3f8e23d5be..aa8a5b00fb 100644 --- a/st2common/tests/unit/test_config_loader.py +++ b/st2common/tests/unit/test_config_loader.py @@ -25,6 +25,37 @@ from st2common.util import crypto from st2tests.base import CleanDbTestCase +from st2tests.fixtures.packs.dummy_pack_1.fixture import PACK_NAME as DUMMY_PACK_1 +from st2tests.fixtures.packs.dummy_pack_4.fixture import PACK_NAME as DUMMY_PACK_4 +from st2tests.fixtures.packs.dummy_pack_5.fixture import PACK_NAME as DUMMY_PACK_5 +from st2tests.fixtures.packs.dummy_pack_17.fixture import PACK_NAME as DUMMY_PACK_17 +from st2tests.fixtures.packs.dummy_pack_schema_with_additional_items_1.fixture import ( + PACK_NAME as DUMMY_PACK_SCHEMA_WITH_ADDITIONAL_ITEMS_1, +) +from st2tests.fixtures.packs.dummy_pack_schema_with_additional_properties_1.fixture import ( + PACK_NAME as DUMMY_PACK_SCHEMA_WITH_ADDITIONAL_PROPERTIES_1, +) +from st2tests.fixtures.packs.dummy_pack_schema_with_nested_object_1.fixture import ( + PACK_NAME as DUMMY_PACK_SCHEMA_WITH_NESTED_OBJECT_1, +) +from st2tests.fixtures.packs.dummy_pack_schema_with_nested_object_2.fixture import ( + PACK_NAME as DUMMY_PACK_SCHEMA_WITH_NESTED_OBJECT_2, +) +from st2tests.fixtures.packs.dummy_pack_schema_with_nested_object_3.fixture import ( + PACK_NAME as DUMMY_PACK_SCHEMA_WITH_NESTED_OBJECT_3, +) +from st2tests.fixtures.packs.dummy_pack_schema_with_nested_object_4.fixture import ( + PACK_NAME as DUMMY_PACK_SCHEMA_WITH_NESTED_OBJECT_4, +) +from st2tests.fixtures.packs.dummy_pack_schema_with_nested_object_5.fixture import ( + PACK_NAME as DUMMY_PACK_SCHEMA_WITH_NESTED_OBJECT_5, +) +from st2tests.fixtures.packs.dummy_pack_schema_with_pattern_and_additional_properties_1.fixture import ( + PACK_NAME as DUMMY_PACK_SCHEMA_WITH_PATTERN_AND_ADDITIONAL_PROPERTIES_1, +) +from st2tests.fixtures.packs.dummy_pack_schema_with_pattern_properties_1.fixture import ( + PACK_NAME as DUMMY_PACK_SCHEMA_WITH_PATTERN_PROPERTIES_1, +) __all__ = ["ContentPackConfigLoaderTestCase"] @@ -37,7 +68,7 @@ def test_ensure_local_pack_config_feature_removed(self): # Test a scenario where all the values are loaded from pack local # config and pack global config (pack name.yaml) doesn't exist. # Test a scenario where no values are overridden in the datastore - loader = ContentPackConfigLoader(pack_name="dummy_pack_4") + loader = ContentPackConfigLoader(pack_name=DUMMY_PACK_4) config = loader.get_config() expected_config = {} @@ -47,7 +78,7 @@ def test_get_config_some_values_overriden_in_datastore(self): # Test a scenario where some values are overriden in datastore via pack # global config kvp_db = set_datastore_value_for_config_key( - pack_name="dummy_pack_5", + pack_name=DUMMY_PACK_5, key_name="api_secret", value="some_api_secret", secret=True, @@ -60,14 +91,14 @@ def test_get_config_some_values_overriden_in_datastore(self): self.assertTrue(kvp_db.secret) kvp_db = set_datastore_value_for_config_key( - pack_name="dummy_pack_5", + pack_name=DUMMY_PACK_5, key_name="private_key_path", value="some_private_key", ) self.assertEqual(kvp_db.value, "some_private_key") self.assertFalse(kvp_db.secret) - loader = ContentPackConfigLoader(pack_name="dummy_pack_5", user="joe") + loader = ContentPackConfigLoader(pack_name=DUMMY_PACK_5, user="joe") config = loader.get_config() # regions is provided in the pack global config @@ -86,19 +117,19 @@ def test_get_config_some_values_overriden_in_datastore(self): def test_get_config_default_value_from_config_schema_is_used(self): # No value is provided for "region" in the config, default value from config schema # should be used - loader = ContentPackConfigLoader(pack_name="dummy_pack_5") + loader = ContentPackConfigLoader(pack_name=DUMMY_PACK_5) config = loader.get_config() self.assertEqual(config["region"], "default-region-value") # Here a default value is specified in schema but an explicit value is provided in the # config - loader = ContentPackConfigLoader(pack_name="dummy_pack_1") + loader = ContentPackConfigLoader(pack_name=DUMMY_PACK_1) config = loader.get_config() self.assertEqual(config["region"], "us-west-1") # Config item attribute has required: false # Value is provided in the config - it should be used as provided - pack_name = "dummy_pack_5" + pack_name = DUMMY_PACK_5 loader = ContentPackConfigLoader(pack_name=pack_name) config = loader.get_config() @@ -120,7 +151,7 @@ def test_get_config_default_value_from_config_schema_is_used(self): ) def test_default_values_from_schema_are_used_when_no_config_exists(self): - pack_name = "dummy_pack_5" + pack_name = DUMMY_PACK_5 config_db = Config.get_by_pack(pack_name) # Delete the existing config loaded in setUp @@ -137,7 +168,7 @@ def test_default_values_from_schema_are_used_when_no_config_exists(self): self.assertEqual(config["region"], "default-region-value") def test_default_values_are_used_when_default_values_are_falsey(self): - pack_name = "dummy_pack_17" + pack_name = DUMMY_PACK_17 loader = ContentPackConfigLoader(pack_name=pack_name) config = loader.get_config() @@ -177,7 +208,7 @@ def test_default_values_are_used_when_default_values_are_falsey(self): def test_get_config_nested_schema_default_values_from_config_schema_are_used(self): # Special case for more complex config schemas with attributes ntesting. # Validate that the default values are also used for one level nested object properties. - pack_name = "dummy_pack_schema_with_nested_object_1" + pack_name = DUMMY_PACK_SCHEMA_WITH_NESTED_OBJECT_1 # 1. None of the nested object values are provided loader = ContentPackConfigLoader(pack_name=pack_name) @@ -196,7 +227,7 @@ def test_get_config_nested_schema_default_values_from_config_schema_are_used(sel self.assertEqual(config, expected_config) # 2. Some of the nested object values are provided (host, port) - pack_name = "dummy_pack_schema_with_nested_object_2" + pack_name = DUMMY_PACK_SCHEMA_WITH_NESTED_OBJECT_2 loader = ContentPackConfigLoader(pack_name=pack_name) config = loader.get_config() @@ -214,7 +245,7 @@ def test_get_config_nested_schema_default_values_from_config_schema_are_used(sel self.assertEqual(config, expected_config) # 3. Nested attribute (auth_settings.token) references a non-secret datastore value - pack_name = "dummy_pack_schema_with_nested_object_3" + pack_name = DUMMY_PACK_SCHEMA_WITH_NESTED_OBJECT_3 kvp_db = set_datastore_value_for_config_key( pack_name=pack_name, @@ -241,7 +272,7 @@ def test_get_config_nested_schema_default_values_from_config_schema_are_used(sel self.assertEqual(config, expected_config) # 4. Nested attribute (auth_settings.token) references a secret datastore value - pack_name = "dummy_pack_schema_with_nested_object_4" + pack_name = DUMMY_PACK_SCHEMA_WITH_NESTED_OBJECT_4 kvp_db = set_datastore_value_for_config_key( pack_name=pack_name, @@ -300,7 +331,7 @@ def test_get_config_nested_schema_default_values_from_config_schema_are_used(sel def test_get_config_dynamic_config_item_render_fails_user_friendly_exception_is_thrown( self, ): - pack_name = "dummy_pack_schema_with_nested_object_5" + pack_name = DUMMY_PACK_SCHEMA_WITH_NESTED_OBJECT_5 loader = ContentPackConfigLoader(pack_name=pack_name) # Render fails on top-level item @@ -521,7 +552,7 @@ def test_get_config_dynamic_config_item_nested_list(self): config_db.delete() def test_get_config_dynamic_config_item_under_additional_properties(self): - pack_name = "dummy_pack_schema_with_additional_properties_1" + pack_name = DUMMY_PACK_SCHEMA_WITH_ADDITIONAL_PROPERTIES_1 loader = ContentPackConfigLoader(pack_name=pack_name) encrypted_value = crypto.symmetric_encrypt( @@ -576,7 +607,7 @@ def test_get_config_dynamic_config_item_under_additional_properties(self): config_db.delete() def test_get_config_dynamic_config_item_under_pattern_properties(self): - pack_name = "dummy_pack_schema_with_pattern_properties_1" + pack_name = DUMMY_PACK_SCHEMA_WITH_PATTERN_PROPERTIES_1 loader = ContentPackConfigLoader(pack_name=pack_name) encrypted_value = crypto.symmetric_encrypt( @@ -631,7 +662,7 @@ def test_get_config_dynamic_config_item_under_pattern_properties(self): config_db.delete() def test_get_config_dynamic_config_item_properties_order_of_precedence(self): - pack_name = "dummy_pack_schema_with_pattern_and_additional_properties_1" + pack_name = DUMMY_PACK_SCHEMA_WITH_PATTERN_AND_ADDITIONAL_PROPERTIES_1 loader = ContentPackConfigLoader(pack_name=pack_name) encrypted_value_1 = crypto.symmetric_encrypt( @@ -736,7 +767,7 @@ def test_get_config_dynamic_config_item_properties_order_of_precedence(self): config_db.delete() def test_get_config_dynamic_config_item_under_additional_items(self): - pack_name = "dummy_pack_schema_with_additional_items_1" + pack_name = DUMMY_PACK_SCHEMA_WITH_ADDITIONAL_ITEMS_1 loader = ContentPackConfigLoader(pack_name=pack_name) encrypted_value = crypto.symmetric_encrypt( diff --git a/st2common/tests/unit/test_configs_registrar.py b/st2common/tests/unit/test_configs_registrar.py index 5c7afe6370..acfb3062f0 100644 --- a/st2common/tests/unit/test_configs_registrar.py +++ b/st2common/tests/unit/test_configs_registrar.py @@ -15,8 +15,6 @@ from __future__ import absolute_import -import os - import six import mock @@ -27,29 +25,31 @@ from st2tests.api import SUPER_SECRET_PARAMETER from st2tests.base import CleanDbTestCase -from st2tests import fixturesloader from st2tests.fixtures.packs.dummy_pack_1.fixture import ( PACK_NAME as DUMMY_PACK_1, PACK_PATH as PACK_1_PATH, ) - - -__all__ = ["ConfigsRegistrarTestCase"] - -PACK_6_PATH = os.path.join( - fixturesloader.get_fixtures_packs_base_path(), "dummy_pack_6" +from st2tests.fixtures.packs.dummy_pack_6.fixture import ( + PACK_NAME as DUMMY_PACK_6, + PACK_PATH as PACK_6_PATH, ) -PACK_19_PATH = os.path.join( - fixturesloader.get_fixtures_packs_base_path(), "dummy_pack_19" +from st2tests.fixtures.packs.dummy_pack_11.fixture import ( + PACK_NAME as DUMMY_PACK_11, + PACK_PATH as PACK_11_PATH, ) -PACK_11_PATH = os.path.join( - fixturesloader.get_fixtures_packs_base_path(), "dummy_pack_11" +from st2tests.fixtures.packs.dummy_pack_19.fixture import ( + PACK_NAME as DUMMY_PACK_19, + PACK_PATH as PACK_19_PATH, ) -PACK_22_PATH = os.path.join( - fixturesloader.get_fixtures_packs_base_path(), "dummy_pack_22" +from st2tests.fixtures.packs.dummy_pack_22.fixture import ( + PACK_NAME as DUMMY_PACK_22, + PACK_PATH as PACK_22_PATH, ) +__all__ = ["ConfigsRegistrarTestCase"] + + class ConfigsRegistrarTestCase(CleanDbTestCase): def test_register_configs_for_all_packs(self): # Verify DB is empty @@ -90,7 +90,7 @@ def test_register_all_configs_invalid_config_no_config_schema(self): registrar = ConfigsRegistrar(use_pack_cache=False, validate_configs=False) registrar._pack_loader.get_packs = mock.Mock() - registrar._pack_loader.get_packs.return_value = {"dummy_pack_6": PACK_6_PATH} + registrar._pack_loader.get_packs.return_value = {DUMMY_PACK_6: PACK_6_PATH} packs_base_paths = content_utils.get_packs_base_paths() registrar.register_from_packs(base_dirs=packs_base_paths) @@ -115,7 +115,7 @@ def test_register_all_configs_with_config_schema_validation_validation_failure_1 use_pack_cache=False, fail_on_failure=True, validate_configs=True ) registrar._pack_loader.get_packs = mock.Mock() - registrar._pack_loader.get_packs.return_value = {"dummy_pack_6": PACK_6_PATH} + registrar._pack_loader.get_packs.return_value = {DUMMY_PACK_6: PACK_6_PATH} # Register ConfigSchema for pack registrar._register_pack_db = mock.Mock() @@ -154,11 +154,11 @@ def test_register_all_configs_with_config_schema_validation_validation_failure_2 use_pack_cache=False, fail_on_failure=True, validate_configs=True ) registrar._pack_loader.get_packs = mock.Mock() - registrar._pack_loader.get_packs.return_value = {"dummy_pack_19": PACK_19_PATH} + registrar._pack_loader.get_packs.return_value = {DUMMY_PACK_19: PACK_19_PATH} # Register ConfigSchema for pack registrar._register_pack_db = mock.Mock() - registrar._register_pack(pack_name="dummy_pack_19", pack_dir=PACK_19_PATH) + registrar._register_pack(pack_name=DUMMY_PACK_19, pack_dir=PACK_19_PATH) packs_base_paths = content_utils.get_packs_base_paths() if six.PY3: @@ -198,11 +198,11 @@ def test_register_all_configs_with_config_schema_validation_validation_failure_3 use_pack_cache=False, fail_on_failure=True, validate_configs=True ) registrar._pack_loader.get_packs = mock.Mock() - registrar._pack_loader.get_packs.return_value = {"dummy_pack_11": PACK_11_PATH} + registrar._pack_loader.get_packs.return_value = {DUMMY_PACK_11: PACK_11_PATH} # Register ConfigSchema for pack registrar._register_pack_db = mock.Mock() - registrar._register_pack(pack_name="dummy_pack_11", pack_dir=PACK_11_PATH) + registrar._register_pack(pack_name=DUMMY_PACK_11, pack_dir=PACK_11_PATH) packs_base_paths = content_utils.get_packs_base_paths() expected_msg = ( @@ -236,11 +236,11 @@ def test_register_all_configs_with_config_schema_validation_validation_failure_4 use_pack_cache=False, fail_on_failure=True, validate_configs=True ) registrar._pack_loader.get_packs = mock.Mock() - registrar._pack_loader.get_packs.return_value = {"dummy_pack_22": PACK_22_PATH} + registrar._pack_loader.get_packs.return_value = {DUMMY_PACK_22: PACK_22_PATH} # Register ConfigSchema for pack registrar._register_pack_db = mock.Mock() - registrar._register_pack(pack_name="dummy_pack_22", pack_dir=PACK_22_PATH) + registrar._register_pack(pack_name=DUMMY_PACK_22, pack_dir=PACK_22_PATH) packs_base_paths = content_utils.get_packs_base_paths() expected_msg = ( diff --git a/st2common/tests/unit/test_content_utils.py b/st2common/tests/unit/test_content_utils.py index 2f1f2ebbce..c9ff10ff29 100644 --- a/st2common/tests/unit/test_content_utils.py +++ b/st2common/tests/unit/test_content_utils.py @@ -35,6 +35,7 @@ PACK_NAME as DUMMY_PACK_1, PACK_PATH as DUMMY_PACK_1_PATH, ) +from st2tests.fixtures.packs.dummy_pack_2.fixture import PACK_PATH as DUMMY_PACK_2_PATH class ContentUtilsTestCase(unittest2.TestCase): @@ -261,7 +262,7 @@ def test_get_relative_path_to_pack_file(self): # 2. Invalid path - outside pack directory expected_msg = r"file_path (.*?) is not located inside the pack directory (.*?)" - file_path = os.path.join(packs_base_paths, "dummy_pack_2/actions/lib/foo.py") + file_path = os.path.join(DUMMY_PACK_2_PATH, "actions/lib/foo.py") self.assertRaisesRegexp( ValueError, expected_msg, diff --git a/st2common/tests/unit/test_policies_registrar.py b/st2common/tests/unit/test_policies_registrar.py index b666d2755b..231c477446 100644 --- a/st2common/tests/unit/test_policies_registrar.py +++ b/st2common/tests/unit/test_policies_registrar.py @@ -32,6 +32,11 @@ PACK_NAME as DUMMY_PACK_1, PACK_PATH as DUMMY_PACK_1_PATH, ) +from st2tests.fixtures.packs.dummy_pack_2.fixture import ( + PACK_NAME as DUMMY_PACK_2, + PACK_PATH as DUMMY_PACK_2_PATH, +) +from st2tests.fixtures.packs.orquesta_tests.fixture import PACK_NAME as ORQUESTA_TESTS __all__ = ["PoliciesRegistrarTestCase"] @@ -85,7 +90,7 @@ def test_register_all_policies(self): "parameters": {"retry_on": "timeout", "max_retry_count": 5}, }, "sequential.retry_on_failure": { - "pack": "orquesta_tests", + "pack": ORQUESTA_TESTS, "type": "action.retry", "parameters": {"retry_on": "failure", "max_retry_count": 1}, }, @@ -128,15 +133,13 @@ def test_register_policy_invalid_policy_type_references(self): def test_make_sure_policy_parameters_are_validated_during_register(self): # Policy where specified parameters fail schema validation registrar = PolicyRegistrar() - policy_path = os.path.join( - get_fixtures_packs_base_path(), "dummy_pack_2/policies/policy_3.yaml" - ) + policy_path = os.path.join(DUMMY_PACK_2_PATH, "policies/policy_3.yaml") expected_msg = "100 is greater than the maximum of 5" self.assertRaisesRegexp( jsonschema.ValidationError, expected_msg, registrar._register_policy, - pack="dummy_pack_2", + pack=DUMMY_PACK_2, policy=policy_path, ) diff --git a/st2common/tests/unit/test_resource_registrar.py b/st2common/tests/unit/test_resource_registrar.py index 3e25b62b90..a1935af7b5 100644 --- a/st2common/tests/unit/test_resource_registrar.py +++ b/st2common/tests/unit/test_resource_registrar.py @@ -32,22 +32,34 @@ PACK_NAME as DUMMY_PACK_1, PACK_PATH as PACK_PATH_1, ) +from st2tests.fixtures.packs.dummy_pack_6.fixture import ( + PACK_NAME as DUMMY_PACK_6, + PACK_PATH as PACK_PATH_6, +) +from st2tests.fixtures.packs.dummy_pack_8.fixture import PACK_PATH as PACK_PATH_8 from st2tests.fixtures.packs.dummy_pack_10.fixture import PACK_PATH as PACK_PATH_10 +from st2tests.fixtures.packs.dummy_pack_13.fixture import PACK_PATH as PACK_PATH_13 +from st2tests.fixtures.packs.dummy_pack_14.fixture import PACK_PATH as PACK_PATH_14 +from st2tests.fixtures.packs.dummy_pack_20.fixture import ( + PACK_NAME as DUMMY_PACK_20, + PACK_PATH as PACK_PATH_20, +) +from st2tests.fixtures.packs.dummy_pack_21.fixture import ( + PACK_NAME as DUMMY_PACK_21, + PACK_PATH as PACK_PATH_21, +) + +# from st2tests.fixtures.packs.dummy_pack_12.fixture import ( +# PACK_PATH as PACK_PATH_12, +# ) # not used? __all__ = ["ResourceRegistrarTestCase"] -PACK_PATH_6 = os.path.join(get_fixtures_base_path(), "packs/dummy_pack_6") PACK_PATH_7 = os.path.join(get_fixtures_base_path(), "packs/dummy_pack_7") -PACK_PATH_8 = os.path.join(get_fixtures_base_path(), "packs/dummy_pack_8") PACK_PATH_9 = os.path.join(get_fixtures_base_path(), "packs/dummy_pack_9") -PACK_PATH_12 = os.path.join(get_fixtures_base_path(), "packs/dummy_pack_12") -PACK_PATH_13 = os.path.join(get_fixtures_base_path(), "packs/dummy_pack_13") -PACK_PATH_14 = os.path.join(get_fixtures_base_path(), "packs/dummy_pack_14") PACK_PATH_17 = os.path.join(get_fixtures_base_path(), "packs_invalid/dummy_pack_17") PACK_PATH_18 = os.path.join(get_fixtures_base_path(), "packs_invalid/dummy_pack_18") -PACK_PATH_20 = os.path.join(get_fixtures_base_path(), "packs/dummy_pack_20") -PACK_PATH_21 = os.path.join(get_fixtures_base_path(), "packs/dummy_pack_21") class ResourceRegistrarTestCase(CleanDbTestCase): @@ -101,13 +113,13 @@ def test_register_pack_arbitrary_properties_are_allowed(self): registrar = ResourceRegistrar(use_pack_cache=False) registrar._pack_loader.get_packs = mock.Mock() registrar._pack_loader.get_packs.return_value = { - "dummy_pack_20": PACK_PATH_20, + DUMMY_PACK_20: PACK_PATH_20, } packs_base_paths = content_utils.get_packs_base_paths() registrar.register_packs(base_dirs=packs_base_paths) # Ref is provided - pack_db = Pack.get_by_name("dummy_pack_20") + pack_db = Pack.get_by_name(DUMMY_PACK_20) self.assertEqual(pack_db.ref, "dummy_pack_20_ref") self.assertEqual(len(pack_db.contributors), 0) @@ -121,13 +133,13 @@ def test_register_pack_pack_ref(self): registrar._pack_loader.get_packs = mock.Mock() registrar._pack_loader.get_packs.return_value = { DUMMY_PACK_1: PACK_PATH_1, - "dummy_pack_6": PACK_PATH_6, + DUMMY_PACK_6: PACK_PATH_6, } packs_base_paths = content_utils.get_packs_base_paths() registrar.register_packs(base_dirs=packs_base_paths) # Ref is provided - pack_db = Pack.get_by_name("dummy_pack_6") + pack_db = Pack.get_by_name(DUMMY_PACK_6) self.assertEqual(pack_db.ref, "dummy_pack_6_ref") self.assertEqual(len(pack_db.contributors), 0) @@ -257,7 +269,7 @@ def test_register_pack_invalid_config_schema_invalid_attribute(self): def test_register_pack_invalid_python_versions_attribute(self): registrar = ResourceRegistrar(use_pack_cache=False, fail_on_failure=True) registrar._pack_loader.get_packs = mock.Mock() - registrar._pack_loader.get_packs.return_value = {"dummy_pack_21": PACK_PATH_21} + registrar._pack_loader.get_packs.return_value = {DUMMY_PACK_21: PACK_PATH_21} packs_base_paths = content_utils.get_packs_base_paths() expected_msg = r"'4' is not one of \['2', '3'\]" diff --git a/st2common/tests/unit/test_virtualenvs.py b/st2common/tests/unit/test_virtualenvs.py index f5d0c3e088..565a2db917 100644 --- a/st2common/tests/unit/test_virtualenvs.py +++ b/st2common/tests/unit/test_virtualenvs.py @@ -29,6 +29,10 @@ from st2common.util.virtualenvs import install_requirements from st2common.util.virtualenvs import setup_pack_virtualenv from st2tests.fixtures.packs.dummy_pack_1.fixture import PACK_NAME as DUMMY_PACK_1 +from st2tests.fixtures.packs.dummy_pack_2.fixture import PACK_NAME as DUMMY_PACK_2 +from st2tests.fixtures.packs.pack_invalid_requirements.fixture import ( + PACK_NAME as PACK_INVALID_REQUIREMENTS, +) __all__ = ["VirtualenvUtilsTestCase"] @@ -105,7 +109,7 @@ def test_setup_pack_virtualenv_already_exists(self): def test_setup_virtualenv_update(self): # Test a virtualenv update with pack which has requirements.txt - pack_name = "dummy_pack_2" + pack_name = DUMMY_PACK_2 pack_virtualenv_dir = os.path.join(self.virtualenvs_path, pack_name) # Verify virtualenv directory doesn't exist @@ -134,7 +138,7 @@ def test_setup_virtualenv_update(self): self.assertVirtualenvExists(pack_virtualenv_dir) def test_setup_virtualenv_invalid_dependency_in_requirements_file(self): - pack_name = "pack_invalid_requirements" + pack_name = PACK_INVALID_REQUIREMENTS pack_virtualenv_dir = os.path.join(self.virtualenvs_path, pack_name) # Verify virtualenv directory doesn't exist diff --git a/st2tests/st2tests/fixtures/packs/action_chain_tests/__init__.py b/st2tests/st2tests/fixtures/packs/action_chain_tests/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/action_chain_tests/fixture.py b/st2tests/st2tests/fixtures/packs/action_chain_tests/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/action_chain_tests/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_11/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_11/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_11/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_11/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_11/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_12/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_12/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_12/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_12/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_12/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_13/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_13/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_13/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_13/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_13/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_14/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_14/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_14/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_14/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_14/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_15/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_15/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_15/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_15/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_15/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_17/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_17/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_17/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_17/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_17/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_18/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_18/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_18/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_19/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_19/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_19/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_19/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_19/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_2/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_2/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_2/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_20/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_20/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_20/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_20/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_20/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_21/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_21/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_21/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_21/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_21/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_22/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_22/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_22/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_22/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_22/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_23/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_23/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_23/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_23/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_23/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_3/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_3/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_3/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_4/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_4/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_4/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_4/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_4/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_5/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_5/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_5/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_5/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_5/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_6/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_6/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_6/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_6/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_6/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_8/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_8/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_8/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_8/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_8/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_items_1/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_items_1/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_items_1/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_items_1/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_items_1/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_properties_1/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_properties_1/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_properties_1/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_properties_1/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_properties_1/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_5/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_5/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_5/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_5/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_5/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_and_additional_properties_1/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_and_additional_properties_1/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_and_additional_properties_1/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_and_additional_properties_1/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_and_additional_properties_1/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_properties_1/__init__.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_properties_1/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_properties_1/fixture.py b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_properties_1/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_properties_1/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/orquesta_tests/__init__.py b/st2tests/st2tests/fixtures/packs/orquesta_tests/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/orquesta_tests/fixture.py b/st2tests/st2tests/fixtures/packs/orquesta_tests/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/orquesta_tests/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/pack_invalid_requirements/__init__.py b/st2tests/st2tests/fixtures/packs/pack_invalid_requirements/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/pack_invalid_requirements/fixture.py b/st2tests/st2tests/fixtures/packs/pack_invalid_requirements/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/pack_invalid_requirements/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__) diff --git a/st2tests/st2tests/fixtures/packs/test_library_dependencies/__init__.py b/st2tests/st2tests/fixtures/packs/test_library_dependencies/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/st2tests/st2tests/fixtures/packs/test_library_dependencies/fixture.py b/st2tests/st2tests/fixtures/packs/test_library_dependencies/fixture.py new file mode 100644 index 0000000000..50c698989e --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/test_library_dependencies/fixture.py @@ -0,0 +1,16 @@ +# Copyright 2022 The StackStorm 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. +from st2tests import fixturesloader + +PACK_NAME, PACK_PATH = fixturesloader.get_fixture_name_and_path(__file__)