mirror of
https://github.com/containers/podman-compose.git
synced 2025-05-31 07:26:13 +02:00
Merge pull request #1211 from p12tic/tests-importable-directories
Move tests to directories that can be imported
This commit is contained in:
commit
6b2665683c
@ -1,2 +0,0 @@
|
||||
ZZVAR1='This value is overwritten by env-file-tests/.env'
|
||||
ZZVAR3='This value is loaded from env-file-tests/.env'
|
2
tests/integration/env_file_tests/.env
Normal file
2
tests/integration/env_file_tests/.env
Normal 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'
|
@ -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):
|
@ -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):
|
@ -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",
|
||||
]
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user