summaryrefslogtreecommitdiff
path: root/test/e2e/rmi_test.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-03-26 15:44:02 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-03-27 05:33:30 -0400
commit4d5199537737b0cfef47d3d2700013a787126d21 (patch)
tree46da1fe2b2a51f437f592465e434c6487d17a1f8 /test/e2e/rmi_test.go
parent4d0b583340c37efbf175c00d75d75107a0b23f00 (diff)
downloadpodman-4d5199537737b0cfef47d3d2700013a787126d21.tar.gz
podman-4d5199537737b0cfef47d3d2700013a787126d21.tar.bz2
podman-4d5199537737b0cfef47d3d2700013a787126d21.zip
Fix podman build --pull-never
Currently pull policy is set incorrectly when users set --pull-never. Also pull-policy is not being translated correctly when using podman-remote. Fixes: #9573 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e/rmi_test.go')
-rw-r--r--test/e2e/rmi_test.go19
1 files changed, 11 insertions, 8 deletions
diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go
index d8367d636..5e6d66d53 100644
--- a/test/e2e/rmi_test.go
+++ b/test/e2e/rmi_test.go
@@ -184,19 +184,20 @@ var _ = Describe("Podman rmi", func() {
It("podman rmi with cached images", func() {
podmanTest.AddImageToRWStore(cirros)
- dockerfile := `FROM quay.io/libpod/cirros:latest
+ dockerfile := fmt.Sprintf(`FROM %s
RUN mkdir hello
RUN touch test.txt
ENV foo=bar
- `
+ `, cirros)
podmanTest.BuildImage(dockerfile, "test", "true")
- dockerfile = `FROM quay.io/libpod/cirros:latest
+ dockerfile = fmt.Sprintf(`FROM %s
RUN mkdir hello
RUN touch test.txt
RUN mkdir blah
ENV foo=bar
- `
+ `, cirros)
+
podmanTest.BuildImage(dockerfile, "test2", "true")
session := podmanTest.Podman([]string{"images", "-q", "-a"})
@@ -249,14 +250,15 @@ var _ = Describe("Podman rmi", func() {
})
It("podman rmi -a with parent|child images", func() {
- dockerfile := `FROM quay.io/libpod/cirros:latest AS base
+ podmanTest.AddImageToRWStore(cirros)
+ dockerfile := fmt.Sprintf(`FROM %s AS base
RUN touch /1
ENV LOCAL=/1
RUN find $LOCAL
FROM base
RUN find $LOCAL
-`
+`, cirros)
podmanTest.BuildImage(dockerfile, "test", "true")
session := podmanTest.Podman([]string{"rmi", "-a"})
session.WaitWithDefaultTimeout()
@@ -284,14 +286,15 @@ RUN find $LOCAL
// a race, we may not hit the condition a 100 percent of times
// but ocal reproducers hit it all the time.
+ podmanTest.AddImageToRWStore(cirros)
var wg sync.WaitGroup
buildAndRemove := func(i int) {
defer GinkgoRecover()
defer wg.Done()
imageName := fmt.Sprintf("rmtest:%d", i)
- containerfile := `FROM quay.io/libpod/cirros:latest
-RUN ` + fmt.Sprintf("touch %s", imageName)
+ containerfile := fmt.Sprintf(`FROM %s
+RUN touch %s`, cirros, imageName)
podmanTest.BuildImage(containerfile, imageName, "false")
session := podmanTest.Podman([]string{"rmi", "-f", imageName})