Skip to content

Commit

Permalink
Fix secret-verify-leak flake: set build context to subdir
Browse files Browse the repository at this point in the history
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
containers#13457, as this makes that PR
actually work.

Signed-off-by: Ashley Cui <[email protected]>
  • Loading branch information
ashley-cui authored and mheon committed Jun 14, 2022
1 parent 2ee28e3 commit 8896051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 8896051

Please sign in to comment.