test/e2e: "podman-remote send correct path to copier" do not leak file

Remove the file from the cwd after the test.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2023-04-17 11:32:22 +02:00
parent 08c651016f
commit 601d228cae

View File

@ -411,6 +411,7 @@ COPY /* /dir`, ALPINE)
containerfilePath := filepath.Join(cwd, "ContainerfilePathToCopier")
err = os.WriteFile(containerfilePath, []byte(containerfile), 0644)
Expect(err).ToNot(HaveOccurred())
defer os.Remove(containerfilePath)
session := podmanTest.Podman([]string{"build", "--pull-never", "-t", "test", "-f", "ContainerfilePathToCopier", targetSubPath})
session.WaitWithDefaultTimeout()