diff options
author | Aditya Rajan <arajan@redhat.com> | 2021-12-16 17:07:16 +0530 |
---|---|---|
committer | Aditya Rajan <arajan@redhat.com> | 2021-12-17 15:07:50 +0530 |
commit | f566d8b8e5351393c03bc0ff475a18174e57af3f (patch) | |
tree | 9235af4b6f3d16bc166202a34100d71b9750e407 /test | |
parent | d984fec351c06a95f8a51c7e6ced819c6b17245f (diff) | |
download | podman-f566d8b8e5351393c03bc0ff475a18174e57af3f.tar.gz podman-f566d8b8e5351393c03bc0ff475a18174e57af3f.tar.bz2 podman-f566d8b8e5351393c03bc0ff475a18174e57af3f.zip |
build: relay exitcode from imagebuildah to registry
Podman does not relay exit code from buildah instead returns a generic
error code `125`. Following PR allows `podman` to relay exit code from
`imagebuildah` to `registry` as it is.
Signed-off-by: Aditya Rajan <arajan@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/build_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go index 9a9dec191..f4511860d 100644 --- a/test/e2e/build_test.go +++ b/test/e2e/build_test.go @@ -273,6 +273,23 @@ RUN printenv http_proxy`, ALPINE) os.Unsetenv("http_proxy") }) + It("podman build relay exit code to process", func() { + if IsRemote() { + // following states true for all the remote commands + Skip("Remote server does not emits error with exit status") + } + podmanTest.AddImageToRWStore(ALPINE) + dockerfile := fmt.Sprintf(`FROM %s +RUN exit 5`, ALPINE) + + dockerfilePath := filepath.Join(podmanTest.TempDir, "Dockerfile") + err := ioutil.WriteFile(dockerfilePath, []byte(dockerfile), 0755) + Expect(err).To(BeNil()) + session := podmanTest.Podman([]string{"build", "-t", "error-test", "--file", dockerfilePath, podmanTest.TempDir}) + session.Wait(120) + Expect(session).Should(Exit(5)) + }) + It("podman build and check identity", func() { session := podmanTest.Podman([]string{"build", "--pull-never", "-f", "build/basicalpine/Containerfile.path", "--no-cache", "-t", "test", "build/basicalpine"}) session.WaitWithDefaultTimeout() |