mirror of
https://github.com/containers/podman.git
synced 2025-05-20 00:27:03 +08:00
Fix flake on machine cp e2e test
Explicitly close file to avoid machine e2e test to fail on CI from time to time. See for example this failed execution of the machine-wsl task: https://api.cirrus-ci.com/v1/artifact/task/6697640798191616/html/machine-wsl-podman-windows-rootless-host-sqlite.log.html Fix #25614 Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
This commit is contained in:
@ -43,13 +43,17 @@ var _ = Describe("podman machine cp", func() {
|
||||
guestToHostDir = "guest-foo-dir"
|
||||
)
|
||||
|
||||
_, err := os.Create(filePath)
|
||||
f, err := os.Create(filePath)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
err = f.Close()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
err = os.MkdirAll(directoryPath, 0755)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
_, err = os.Create(fileInDirectoryPath)
|
||||
f, err = os.Create(fileInDirectoryPath)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
err = f.Close()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
name := randomString()
|
||||
|
Reference in New Issue
Block a user