Merge pull request #1211 from p12tic/tests-importable-directories

Move tests to directories that can be imported
This commit is contained in:
Povilas Kanapickas 2025-05-24 17:09:03 +03:00 committed by GitHub
commit 6b2665683c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 11 additions and 11 deletions

View File

@ -1,2 +0,0 @@
ZZVAR1='This value is overwritten by env-file-tests/.env'
ZZVAR3='This value is loaded from env-file-tests/.env'

View File

@ -0,0 +1,2 @@
ZZVAR1='This value is overwritten by env_file_tests/.env'
ZZVAR3='This value is loaded from env_file_tests/.env'

View File

@ -9,7 +9,7 @@ from tests.integration.test_utils import test_path
def compose_base_path():
return os.path.join(test_path(), "env-file-tests")
return os.path.join(test_path(), "env_file_tests")
class TestComposeEnvFile(unittest.TestCase, RunSubprocessMixin):

View File

@ -9,7 +9,7 @@ from tests.integration.test_utils import test_path
def compose_yaml_path():
return os.path.join(os.path.join(test_path(), "env-tests"), "container-compose.yml")
return os.path.join(os.path.join(test_path(), "env_tests"), "container-compose.yml")
class TestComposeEnv(unittest.TestCase, RunSubprocessMixin):

View File

@ -9,7 +9,7 @@ from tests.integration.test_utils import test_path
def compose_yaml_path():
return os.path.join(os.path.join(test_path(), "exit-from"), "docker-compose.yaml")
return os.path.join(os.path.join(test_path(), "exit_from"), "docker-compose.yaml")
class TestComposeExitFrom(unittest.TestCase, RunSubprocessMixin):
@ -59,7 +59,7 @@ class TestComposeExitFrom(unittest.TestCase, RunSubprocessMixin):
"run",
podman_compose_path(),
"-f",
os.path.join(test_path(), "exit-from", "docker-compose.yaml"),
compose_yaml_path(),
"up",
]

View File

@ -262,7 +262,7 @@ class TestContainerToArgs(unittest.IsolatedAsyncioTestCase):
c = create_compose_mock()
cnt = get_minimal_container()
env_file = get_test_file_path('tests/integration/env-file-tests/env-files/project-1.env')
env_file = get_test_file_path('tests/integration/env_file_tests/env-files/project-1.env')
cnt['env_file'] = env_file
args = await container_to_args(c, cnt)
@ -295,7 +295,7 @@ class TestContainerToArgs(unittest.IsolatedAsyncioTestCase):
c = create_compose_mock()
cnt = get_minimal_container()
env_file = get_test_file_path('tests/integration/env-file-tests/env-files/project-1.env')
env_file = get_test_file_path('tests/integration/env_file_tests/env-files/project-1.env')
cnt['env_file'] = [env_file]
args = await container_to_args(c, cnt)
@ -319,8 +319,8 @@ class TestContainerToArgs(unittest.IsolatedAsyncioTestCase):
c = create_compose_mock()
cnt = get_minimal_container()
env_file = get_test_file_path('tests/integration/env-file-tests/env-files/project-1.env')
env_file_2 = get_test_file_path('tests/integration/env-file-tests/env-files/project-2.env')
env_file = get_test_file_path('tests/integration/env_file_tests/env-files/project-1.env')
env_file_2 = get_test_file_path('tests/integration/env_file_tests/env-files/project-2.env')
cnt['env_file'] = [env_file, env_file_2]
args = await container_to_args(c, cnt)
@ -348,7 +348,7 @@ class TestContainerToArgs(unittest.IsolatedAsyncioTestCase):
c = create_compose_mock()
cnt = get_minimal_container()
env_file = get_test_file_path('tests/integration/env-file-tests/env-files/project-1.env')
env_file = get_test_file_path('tests/integration/env_file_tests/env-files/project-1.env')
cnt['env_file'] = {'path': env_file, 'required': True}
args = await container_to_args(c, cnt)