tests/integration: Move test "extends_w_empty_service" to corresp. dir

Signed-off-by: Monika Kairaityte <monika@kibit.lt>
This commit is contained in:
Monika Kairaityte 2025-01-19 20:50:11 +02:00
parent 6022669991
commit ba95100cff
3 changed files with 25 additions and 23 deletions

View File

@ -0,0 +1 @@

View File

@ -2,6 +2,7 @@
import os
import unittest
from pathlib import Path
from tests.integration.test_podman_compose import podman_compose_path
from tests.integration.test_podman_compose import test_path
@ -37,3 +38,26 @@ class TestComposeExtendsWithEmptyService(unittest.TestCase, RunSubprocessMixin):
compose_yaml_path(),
"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)

View File

@ -86,26 +86,3 @@ class TestPodmanCompose(unittest.TestCase, RunSubprocessMixin):
# check container did not exists anymore
out, _ = self.run_subprocess_assert_returncode(command_check_container)
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)