mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
test for buildah version in container images.
Check to see if we are recording the version of buildah used to build the image as a label in the image. Also we should make sure the filter "since" works. We are only testing "after", which we don't document. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -7,6 +7,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/containers/buildah"
|
||||
. "github.com/containers/podman/v2/test/utils"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
@ -239,4 +240,16 @@ RUN printenv http_proxy`
|
||||
Expect(ok).To(BeTrue())
|
||||
os.Unsetenv("http_proxy")
|
||||
})
|
||||
|
||||
It("podman build and check identity", func() {
|
||||
session := podmanTest.Podman([]string{"build", "-f", "Containerfile.path", "--no-cache", "-t", "test", "build/basicalpine"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
// Verify that OS and Arch are being set
|
||||
inspect := podmanTest.PodmanNoCache([]string{"image", "inspect", "--format", "{{ index .Config.Labels }}", "test"})
|
||||
inspect.WaitWithDefaultTimeout()
|
||||
data := inspect.OutputToString()
|
||||
Expect(data).To(ContainSubstring(buildah.Version))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user