mirror of
https://github.com/containers/podman-compose.git
synced 2025-04-10 01:49:09 +02:00
tests/integration: Move test "extends_w_empty_service" to corresp. dir
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
This commit is contained in:
parent
6022669991
commit
ba95100cff
1
tests/integration/extends_w_empty_service/__init__.py
Normal file
1
tests/integration/extends_w_empty_service/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from tests.integration.test_podman_compose import podman_compose_path
|
from tests.integration.test_podman_compose import podman_compose_path
|
||||||
from tests.integration.test_podman_compose import test_path
|
from tests.integration.test_podman_compose import test_path
|
||||||
@ -37,3 +38,26 @@ class TestComposeExtendsWithEmptyService(unittest.TestCase, RunSubprocessMixin):
|
|||||||
compose_yaml_path(),
|
compose_yaml_path(),
|
||||||
"down",
|
"down",
|
||||||
])
|
])
|
||||||
|
|
||||||
|
def test_podman_compose_extends_w_empty_service(self):
|
||||||
|
"""
|
||||||
|
Test that podman-compose can execute podman-compose -f <file> up with extended File which
|
||||||
|
includes an empty service. (e.g. if the file is used as placeholder for more complex
|
||||||
|
configurations.)
|
||||||
|
"""
|
||||||
|
main_path = Path(__file__).parent.parent.parent.parent
|
||||||
|
|
||||||
|
command_up = [
|
||||||
|
"python3",
|
||||||
|
str(main_path.joinpath("podman_compose.py")),
|
||||||
|
"-f",
|
||||||
|
str(
|
||||||
|
main_path.joinpath(
|
||||||
|
"tests", "integration", "extends_w_empty_service", "docker-compose.yml"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"up",
|
||||||
|
"-d",
|
||||||
|
]
|
||||||
|
|
||||||
|
self.run_subprocess_assert_returncode(command_up)
|
@ -86,26 +86,3 @@ class TestPodmanCompose(unittest.TestCase, RunSubprocessMixin):
|
|||||||
# check container did not exists anymore
|
# check container did not exists anymore
|
||||||
out, _ = self.run_subprocess_assert_returncode(command_check_container)
|
out, _ = self.run_subprocess_assert_returncode(command_check_container)
|
||||||
self.assertEqual(out, b'')
|
self.assertEqual(out, b'')
|
||||||
|
|
||||||
def test_extends_w_empty_service(self):
|
|
||||||
"""
|
|
||||||
Test that podman-compose can execute podman-compose -f <file> up with extended File which
|
|
||||||
includes an empty service. (e.g. if the file is used as placeholder for more complex
|
|
||||||
configurations.)
|
|
||||||
"""
|
|
||||||
main_path = Path(__file__).parent.parent.parent
|
|
||||||
|
|
||||||
command_up = [
|
|
||||||
"python3",
|
|
||||||
str(main_path.joinpath("podman_compose.py")),
|
|
||||||
"-f",
|
|
||||||
str(
|
|
||||||
main_path.joinpath(
|
|
||||||
"tests", "integration", "extends_w_empty_service", "docker-compose.yml"
|
|
||||||
)
|
|
||||||
),
|
|
||||||
"up",
|
|
||||||
"-d",
|
|
||||||
]
|
|
||||||
|
|
||||||
self.run_subprocess_assert_returncode(command_up)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user