Merge pull request #25707 from Luap99/logs

podman logs: allow options after argument
This commit is contained in:
openshift-merge-bot[bot]
2025-03-31 12:53:16 +00:00
committed by GitHub
4 changed files with 5 additions and 4 deletions

View File

@@ -122,7 +122,9 @@ var _ = Describe("Podman logs", func() {
Expect(wait).To(ExitCleanly())
Eventually(func(g Gomega) {
results := podmanTest.Podman([]string{"logs", "--tail", "99", name})
// Options after name should work as well
// https://github.com/containers/podman/issues/25653
results := podmanTest.Podman([]string{"logs", name, "--tail", "99"})
results.WaitWithDefaultTimeout()
g.Expect(results).To(ExitCleanly())
g.Expect(results.OutputToStringArray()).To(HaveLen(3))

View File

@@ -341,7 +341,8 @@ function _log_test_follow_since() {
sleep 0.2
# Make sure podman logs actually follows by giving a low timeout and check that the command times out
PODMAN_TIMEOUT=3 run_podman 124 ${events_backend} logs --since 0.1s -f $cname
# Option after container name should work as well: https://github.com/containers/podman/issues/25653
PODMAN_TIMEOUT=3 run_podman 124 ${events_backend} logs --since 0.1s $cname -f
assert "$output" =~ "$content
timeout: sending signal TERM to command.*" "logs --since -f on running container works"