From 6243f5cebed7ee57b665cee46e23b45ea145dc08 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 29 May 2024 16:36:23 +0200 Subject: [PATCH] tests: simplify expected output the condition doesn't work when the runtime to use is specified through its absolute path as the error message contains that. Simplify the check and just look for "read from the init process". Signed-off-by: Giuseppe Scrivano --- test/e2e/run_seccomp_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/e2e/run_seccomp_test.go b/test/e2e/run_seccomp_test.go index 735d3e145e..21387d6cb0 100644 --- a/test/e2e/run_seccomp_test.go +++ b/test/e2e/run_seccomp_test.go @@ -1,6 +1,8 @@ package integration import ( + "fmt" + . "github.com/containers/podman/v5/test/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -39,9 +41,9 @@ var _ = Describe("Podman run", func() { // 127 + failed to connect to container's attach socket ... ENOENT Expect(session.ExitCode()).To(BeNumerically(">=", 126), "Exit status using runc") } else { - expect := "OCI runtime error: crun: read from the init process" + expect := fmt.Sprintf("OCI runtime error: %s: read from the init process", podmanTest.OCIRuntime) if IsRemote() { - expect = "for attach: crun: read from the init process: OCI runtime error" + expect = fmt.Sprintf("for attach: %s: read from the init process: OCI runtime error", podmanTest.OCIRuntime) } Expect(session).To(ExitWithError(126, expect)) }