From 096dc1370a1b442b657300f679d0461efdf6ee14 Mon Sep 17 00:00:00 2001 From: Daniel Mil Date: Thu, 6 Jul 2023 14:27:17 -0700 Subject: [PATCH] Fix broken e2e test --- tests/end_to_end/end_to_end_base.py | 4 ++++ tests/end_to_end/test_runtimes_e2e.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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