diff options
author | Brent Baude <bbaude@redhat.com> | 2021-09-21 07:52:22 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2021-09-23 09:49:57 -0500 |
commit | 2df0685cbee560cde3ddaffae87b036d9882d7ea (patch) | |
tree | 61557201c072bcf14ea3c92c9ccf465eb17b98fc /test | |
parent | 6b8371b1a3a7364d0527d5d87a8aa9a3d1294ac9 (diff) | |
download | podman-2df0685cbee560cde3ddaffae87b036d9882d7ea.tar.gz podman-2df0685cbee560cde3ddaffae87b036d9882d7ea.tar.bz2 podman-2df0685cbee560cde3ddaffae87b036d9882d7ea.zip |
Set context dir for play kube build
When performing an image build with play kube, we need to set the
context directory so things like file copies have the correct input
path.
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/play_build_test.go | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/test/e2e/play_build_test.go b/test/e2e/play_build_test.go index 16f2687f3..564735e07 100644 --- a/test/e2e/play_build_test.go +++ b/test/e2e/play_build_test.go @@ -80,12 +80,17 @@ status: {} FROM quay.io/libpod/alpine_nginx:latest RUN apk update && apk add strace LABEL homer=dad +COPY copyfile /copyfile ` var prebuiltImage = ` FROM quay.io/libpod/alpine_nginx:latest RUN apk update && apk add strace LABEL marge=mom ` + + var copyFile = `just a text file +` + It("Check that image is built using Dockerfile", func() { // Setup yamlDir := filepath.Join(tempdir, RandomString(12)) @@ -97,7 +102,9 @@ LABEL marge=mom Expect(err).To(BeNil()) err = writeYaml(playBuildFile, filepath.Join(app1Dir, "Dockerfile")) Expect(err).To(BeNil()) - + // Write a file to be copied + err = writeYaml(copyFile, filepath.Join(app1Dir, "copyfile")) + Expect(err).To(BeNil()) // Switch to temp dir and restore it afterwards cwd, err := os.Getwd() Expect(err).To(BeNil()) @@ -131,7 +138,9 @@ LABEL marge=mom Expect(err).To(BeNil()) err = writeYaml(playBuildFile, filepath.Join(app1Dir, "Containerfile")) Expect(err).To(BeNil()) - + // Write a file to be copied + err = writeYaml(copyFile, filepath.Join(app1Dir, "copyfile")) + Expect(err).To(BeNil()) // Switch to temp dir and restore it afterwards cwd, err := os.Getwd() Expect(err).To(BeNil()) @@ -172,6 +181,9 @@ LABEL marge=mom Expect(err).To(BeNil()) err = writeYaml(playBuildFile, filepath.Join(app1Dir, "Containerfile")) Expect(err).To(BeNil()) + // Write a file to be copied + err = writeYaml(copyFile, filepath.Join(app1Dir, "copyfile")) + Expect(err).To(BeNil()) // Switch to temp dir and restore it afterwards cwd, err := os.Getwd() @@ -215,6 +227,9 @@ LABEL marge=mom Expect(err).To(BeNil()) err = writeYaml(playBuildFile, filepath.Join(app1Dir, "Containerfile")) Expect(err).To(BeNil()) + // Write a file to be copied + err = writeYaml(copyFile, filepath.Join(app1Dir, "copyfile")) + Expect(err).To(BeNil()) // Switch to temp dir and restore it afterwards cwd, err := os.Getwd() |