mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
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>
This commit is contained in:
@ -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"))
|
||||
|
Reference in New Issue
Block a user