From b29bf9afdca6dda2d75d50bacb7de51b5420d7b0 Mon Sep 17 00:00:00 2001 From: Ziwen Ning Date: Wed, 25 Jan 2023 23:12:04 -0800 Subject: [PATCH] feat: test build-arg local env value pass-through Signed-off-by: Ziwen Ning --- tests/build.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/build.go b/tests/build.go index c240dd6..1e4d0dc 100644 --- a/tests/build.go +++ b/tests/build.go @@ -104,6 +104,10 @@ func Build(o *option.Option) { stdErr := command.Stderr(o, "build", "-f", dockerFilePath, "--no-cache", "--progress=plain", "--build-arg", "VERSION=3.13", buildContext) gomega.Expect(stdErr).Should(gomega.ContainSubstring("public.ecr.aws/docker/library/alpine:3.13")) + gomega.Expect(os.Setenv("VERSION", "3.13")).To(gomega.Succeed()) + stdErr = command.Stderr(o, "build", "-f", dockerFilePath, "--no-cache", "--progress=plain", + "--build-arg", "VERSION", buildContext) + gomega.Expect(stdErr).Should(gomega.ContainSubstring("public.ecr.aws/docker/library/alpine:3.13")) }) ginkgo.It("build image with --progress=plain", func() {