| 1 |
|
| 2 |
|
| 3 |
import os |
| 4 |
import unittest |
| 5 |
|
| 6 |
from tests.integration.test_utils import RunSubprocessMixin |
| 7 |
from tests.integration.test_utils import podman_compose_path |
| 8 |
from tests.integration.test_utils import test_path |
| 9 |
|
| 10 |
|
| 11 |
def compose_yaml_path() -> str: |
| 12 |
""" "Returns the path to the compose file used for this test module""" |
| 13 |
base_path = os.path.join(test_path(), "commands_fail_exit_code") |
| 14 |
return os.path.join(base_path, "docker-compose.yml") |
| 15 |
|
| 16 |
|
| 17 |
class TestConfigCommand(unittest.TestCase, RunSubprocessMixin): |
| 18 |
def test_config_quiet(self) -> None: |
| 19 |
""" |
| 20 |
Tests podman-compose config command with the --quiet flag. |
| 21 |
""" |
| 22 |
config_cmd = [ |
| 23 |
"coverage", |
| 24 |
"run", |
| 25 |
podman_compose_path(), |
| 26 |
"-f", |
| 27 |
compose_yaml_path(), |
| 28 |
"config", |
| 29 |
"--quiet", |
| 30 |
] |
| 31 |
|
| 32 |
out, _ = self.run_subprocess_assert_returncode(config_cmd) |
| 33 |
self.assertEqual(out.decode("utf-8"), "") |