diff --git a/tests/end_to_end/end_to_end_base.py b/tests/end_to_end/end_to_end_base.py index 926a325e86..97ad1cf3c1 100644 --- a/tests/end_to_end/end_to_end_base.py +++ b/tests/end_to_end/end_to_end_base.py @@ -1,3 +1,5 @@ +from pathlib import Path + import os from typing import List @@ -25,9 +27,11 @@ class EndToEndBase(InitIntegBase, StackOutputsIntegBase, DeleteIntegBase, SyncIn def setUp(self): super().setUp() + e2e_dir = Path(__file__).resolve().parent self.stacks = [] self.config_file_dir = GlobalConfig().config_dir self._create_config_dir() + self.e2e_test_data_path = Path(e2e_dir, "testdata") def _create_config_dir(self): # Init tests will lock the config dir, ensure it exists before obtaining a lock diff --git a/tests/end_to_end/test_runtimes_e2e.py b/tests/end_to_end/test_runtimes_e2e.py index 9955c28341..b5d7346161 100644 --- a/tests/end_to_end/test_runtimes_e2e.py +++ b/tests/end_to_end/test_runtimes_e2e.py @@ -175,7 +175,7 @@ def test_integration(self): event = '{"hello": "world"}' stack_name = self._method_to_stack_name(self.id()) with EndToEndTestContext(self.app_name) as e2e_context: - project_path = str(Path("testdata") / "esbuild-datadog-integration") + project_path = str(self.e2e_test_data_path / "esbuild-datadog-integration") os.mkdir(e2e_context.project_directory) copy_tree(project_path, e2e_context.project_directory) self.template_path = e2e_context.template_path