mirror of
https://github.com/containers/podman.git
synced 2025-06-24 03:08:13 +08:00
e2e: make BuildImage parallel-safe
"image rm concurrent" test is still failing, even after #18664: Error: no contents in "/tmp/podman_test967723851/Dockerfile" Probable cause: the images are built in parallel, and p.BuildImage() writes one single Dockerfile. (This almost certainly renders the test less effective than intended, since the generated images might end up being identical). Solution: write and use a uniquely-named Dockerfile Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
@ -1188,7 +1188,7 @@ func (s *PodmanSessionIntegration) jq(jqCommand string) (string, error) {
|
||||
}
|
||||
|
||||
func (p *PodmanTestIntegration) buildImage(dockerfile, imageName string, layers string, label string) string {
|
||||
dockerfilePath := filepath.Join(p.TempDir, "Dockerfile")
|
||||
dockerfilePath := filepath.Join(p.TempDir, "Dockerfile-"+stringid.GenerateRandomID())
|
||||
err := os.WriteFile(dockerfilePath, []byte(dockerfile), 0755)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
cmd := []string{"build", "--pull-never", "--layers=" + layers, "--file", dockerfilePath}
|
||||
|
Reference in New Issue
Block a user