test: adapt tests new crun error messages

Needed-by: https://github.com/containers/crun/pull/1672

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2025-02-17 09:12:31 +01:00
parent 35d2a65e3a
commit c65bb903b6
6 changed files with 39 additions and 18 deletions

View File

@@ -22,7 +22,7 @@ var _ = Describe("Podman run exit", func() {
It("podman run exit ExecErrorCodeCannotInvoke", func() {
result := podmanTest.Podman([]string{"run", ALPINE, "/etc"})
result.WaitWithDefaultTimeout()
Expect(result).Should(ExitWithError(define.ExecErrorCodeCannotInvoke, "open executable: Operation not permitted: OCI permission denied"))
Expect(result).Should(ExitWithErrorRegex(define.ExecErrorCodeCannotInvoke, ".*(open executable|the path `/etc` is not a regular file): Operation not permitted: OCI permission denied.*"))
})
It("podman run exit ExecErrorCodeNotFound", func() {