Run should not add --requires if --no-deps.

Fixes #717.

Signed-off-by: Emanuel Rietveld <e.j.rietveld@gmail.com>
This commit is contained in:
Emanuel Rietveld
2025-01-15 07:31:53 +01:00
parent 48c6c38fcd
commit 8206cc3ea2
2 changed files with 28 additions and 3 deletions

View File

@ -35,6 +35,31 @@ class TestComposeBaseDeps(unittest.TestCase, RunSubprocessMixin):
"down",
])
def test_run_nodeps(self):
try:
output, error = self.run_subprocess_assert_returncode([
podman_compose_path(),
"-f",
compose_yaml_path(),
"run",
"--rm",
"--no-deps",
"sleep",
"/bin/sh",
"-c",
"wget -O - http://web:8000/hosts || echo Failed to connect",
])
self.assertNotIn(b"HTTP request sent, awaiting response... 200 OK", output)
self.assertNotIn(b"deps_web_1", output)
self.assertIn(b"Failed to connect", 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):