mirror of
https://github.com/containers/podman-compose.git
synced 2025-08-17 09:01:19 +02:00
tests/integration: Add type annotations
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This commit is contained in:
@ -10,20 +10,20 @@ 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(os.path.join(test_path(), "nethost"), "docker-compose.yaml")
|
||||
|
||||
|
||||
class TestComposeNethost(unittest.TestCase, RunSubprocessMixin):
|
||||
# check if container listens for http requests and sends response back
|
||||
# as network_mode: host allows to connect to container easily
|
||||
def test_nethost(self):
|
||||
def test_nethost(self) -> None:
|
||||
try:
|
||||
self.run_subprocess_assert_returncode(
|
||||
[podman_compose_path(), "-f", compose_yaml_path(), "up", "-d"],
|
||||
)
|
||||
|
||||
container_id, _ = self.run_subprocess_assert_returncode(
|
||||
container_id_out, _ = self.run_subprocess_assert_returncode(
|
||||
[
|
||||
podman_compose_path(),
|
||||
"-f",
|
||||
@ -33,7 +33,7 @@ class TestComposeNethost(unittest.TestCase, RunSubprocessMixin):
|
||||
'{{.ID}}',
|
||||
],
|
||||
)
|
||||
container_id = container_id.decode('utf-8').split('\n')[0]
|
||||
container_id = container_id_out.decode('utf-8').split('\n')[0]
|
||||
output, _ = self.run_subprocess_assert_returncode(
|
||||
[
|
||||
"podman",
|
||||
|
Reference in New Issue
Block a user