mirror of
https://github.com/containers/podman-compose.git
synced 2025-08-09 21:57:44 +02:00
Exclude dependent containers on up if --no-deps.
Fixes #398. Signed-off-by: Emanuel Rietveld <e.j.rietveld@gmail.com>
This commit is contained in:
@ -60,6 +60,33 @@ class TestComposeBaseDeps(unittest.TestCase, RunSubprocessMixin):
|
||||
"down",
|
||||
])
|
||||
|
||||
def test_up_nodeps(self):
|
||||
try:
|
||||
self.run_subprocess_assert_returncode([
|
||||
podman_compose_path(),
|
||||
"-f",
|
||||
compose_yaml_path(),
|
||||
"up",
|
||||
"--no-deps",
|
||||
"--detach",
|
||||
"sleep",
|
||||
])
|
||||
output, error = self.run_subprocess_assert_returncode([
|
||||
podman_compose_path(),
|
||||
"-f",
|
||||
compose_yaml_path(),
|
||||
"ps",
|
||||
])
|
||||
self.assertNotIn(b"deps_web_1", output)
|
||||
self.assertIn(b"deps_sleep_1", output)
|
||||
finally:
|
||||
self.run_subprocess_assert_returncode([
|
||||
podman_compose_path(),
|
||||
"-f",
|
||||
compose_yaml_path(),
|
||||
"down",
|
||||
])
|
||||
|
||||
|
||||
class TestComposeConditionalDeps(unittest.TestCase, RunSubprocessMixin):
|
||||
def test_deps_succeeds(self):
|
||||
|
Reference in New Issue
Block a user