From 9de092ec001ed64ab9f1f40e24ee204e46cf73eb Mon Sep 17 00:00:00 2001
From: Ashley Cui <acui@redhat.com>
Date: Fri, 3 Jun 2022 14:08:59 -0400
Subject: Fix secret-verify-leak flake: set build context to subdir

Setting the build context to a dedicated subdir makes sure that the test does not
flake when running in parallel, as the test is isolated from other tests
that may dump secrets in a higher level context dir.

This should have been done in
https://github.com/containers/podman/pull/13457, as this makes that PR
actually work.

Signed-off-by: Ashley Cui <acui@redhat.com>
---
 test/e2e/build_test.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'test/e2e')

diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go
index 86dc76116..0b766dcc8 100644
--- a/test/e2e/build_test.go
+++ b/test/e2e/build_test.go
@@ -85,7 +85,7 @@ var _ = Describe("Podman build", func() {
 	})
 
 	It("podman build with a secret from file and verify if secret file is not leaked into image", func() {
-		session := podmanTest.Podman([]string{"build", "-f", "build/secret-verify-leak/Containerfile.with-secret-verify-leak", "-t", "secret-test-leak", "--secret", "id=mysecret,src=build/secret.txt", "build/"})
+		session := podmanTest.Podman([]string{"build", "-f", "build/secret-verify-leak/Containerfile.with-secret-verify-leak", "-t", "secret-test-leak", "--secret", "id=mysecret,src=build/secret.txt", "build/secret-verify-leak"})
 		session.WaitWithDefaultTimeout()
 		Expect(session).Should(Exit(0))
 		Expect(session.OutputToString()).To(ContainSubstring("somesecret"))
-- 
cgit v1.2.3-54-g00ecf