mirror of
https://github.com/containers/podman-compose.git
synced 2025-08-17 17:11:21 +02:00
tests/integration: Add type annotations
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This commit is contained in:
@ -9,7 +9,7 @@ from tests.integration.test_utils import podman_compose_path
|
||||
from tests.integration.test_utils import test_path
|
||||
|
||||
|
||||
def compose_yaml_path():
|
||||
def compose_yaml_path() -> str:
|
||||
return os.path.join(
|
||||
test_path(),
|
||||
"merge/reset_and_override_tags/override_tag_attribute/docker-compose.yaml",
|
||||
@ -18,7 +18,7 @@ def compose_yaml_path():
|
||||
|
||||
class TestComposeOverrideTagAttribute(unittest.TestCase, RunSubprocessMixin):
|
||||
# test if a service attribute from docker-compose.yaml file is overridden
|
||||
def test_override_tag_attribute(self):
|
||||
def test_override_tag_attribute(self) -> None:
|
||||
override_file = os.path.join(
|
||||
test_path(),
|
||||
"merge/reset_and_override_tags/override_tag_attribute/docker-compose.override_attribute.yaml",
|
||||
|
@ -9,7 +9,7 @@ from tests.integration.test_utils import podman_compose_path
|
||||
from tests.integration.test_utils import test_path
|
||||
|
||||
|
||||
def compose_yaml_path():
|
||||
def compose_yaml_path() -> str:
|
||||
return os.path.join(
|
||||
test_path(),
|
||||
"merge/reset_and_override_tags/override_tag_service/docker-compose.yaml",
|
||||
@ -18,7 +18,7 @@ def compose_yaml_path():
|
||||
|
||||
class TestComposeOverrideTagService(unittest.TestCase, RunSubprocessMixin):
|
||||
# test if whole service from docker-compose.yaml file is overridden in another file
|
||||
def test_override_tag_service(self):
|
||||
def test_override_tag_service(self) -> None:
|
||||
override_file = os.path.join(
|
||||
test_path(),
|
||||
"merge/reset_and_override_tags/override_tag_service/docker-compose.override_service.yaml",
|
||||
|
@ -8,7 +8,7 @@ from tests.integration.test_utils import podman_compose_path
|
||||
from tests.integration.test_utils import test_path
|
||||
|
||||
|
||||
def compose_yaml_path():
|
||||
def compose_yaml_path() -> str:
|
||||
return os.path.join(
|
||||
test_path(),
|
||||
"merge/reset_and_override_tags/reset_tag_attribute/docker-compose.yaml",
|
||||
@ -17,7 +17,7 @@ def compose_yaml_path():
|
||||
|
||||
class TestComposeResetTagAttribute(unittest.TestCase, RunSubprocessMixin):
|
||||
# test if the attribute of the service is correctly reset
|
||||
def test_reset_tag_attribute(self):
|
||||
def test_reset_tag_attribute(self) -> None:
|
||||
reset_file = os.path.join(
|
||||
test_path(),
|
||||
"merge/reset_and_override_tags/reset_tag_attribute/docker-compose.reset_attribute.yaml",
|
||||
|
@ -8,7 +8,7 @@ from tests.integration.test_utils import podman_compose_path
|
||||
from tests.integration.test_utils import test_path
|
||||
|
||||
|
||||
def compose_yaml_path():
|
||||
def compose_yaml_path() -> str:
|
||||
return os.path.join(
|
||||
test_path(), "merge/reset_and_override_tags/reset_tag_service/docker-compose.yaml"
|
||||
)
|
||||
@ -16,7 +16,7 @@ def compose_yaml_path():
|
||||
|
||||
class TestComposeResetTagService(unittest.TestCase, RunSubprocessMixin):
|
||||
# test if whole service from docker-compose.yaml file is reset
|
||||
def test_reset_tag_service(self):
|
||||
def test_reset_tag_service(self) -> None:
|
||||
reset_file = os.path.join(
|
||||
test_path(),
|
||||
"merge/reset_and_override_tags/reset_tag_service/docker-compose.reset_service.yaml",
|
||||
|
@ -9,14 +9,14 @@ from tests.integration.test_utils import podman_compose_path
|
||||
from tests.integration.test_utils import test_path
|
||||
|
||||
|
||||
def compose_yaml_path(compose_name):
|
||||
def compose_yaml_path(compose_name: str) -> str:
|
||||
""" "Returns the path to the compose file used for this test module"""
|
||||
base_path = os.path.join(test_path(), "merge/volumes_merge/")
|
||||
return os.path.join(base_path, compose_name)
|
||||
|
||||
|
||||
class TestComposeVolumesMerge(unittest.TestCase, RunSubprocessMixin):
|
||||
def test_volumes_merge(self):
|
||||
def test_volumes_merge(self) -> None:
|
||||
# test if additional compose file overrides host path and access mode of a volume
|
||||
try:
|
||||
self.run_subprocess_assert_returncode([
|
||||
|
Reference in New Issue
Block a user