Update expected output for a machine copy test

The podman machine copy test "attempt copying file to a new directory"
was failing because on recent version of Windows the error message
doesn't match the expected error message. To make it work on new and
old version of Windows both old and new error messages are now
considered as valid.

Fixes https://github.com/containers/podman/issues/26056

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
This commit is contained in:
Mario Loriedo
2025-05-21 14:36:38 +02:00
parent af495e1aa9
commit 9872f0e83c

View File

@ -357,7 +357,8 @@ var _ = Describe("run cp commands", func() {
switch runtime.GOOS { switch runtime.GOOS {
case "windows": case "windows":
hostDirPath = filepath.ToSlash(hostDirPath) hostDirPath = filepath.ToSlash(hostDirPath)
fallthrough Expect(session.errorToString()).To(Or(ContainSubstring(fmt.Sprintf("scp: open local \"%s\": No such file or directory", hostDirPath)),
ContainSubstring(fmt.Sprintf("scp: open local \"%s\": Unknown error", hostDirPath))))
case "darwin": case "darwin":
Expect(session.errorToString()).To(ContainSubstring(fmt.Sprintf("scp: open local \"%s\": No such file or directory", hostDirPath))) Expect(session.errorToString()).To(ContainSubstring(fmt.Sprintf("scp: open local \"%s\": No such file or directory", hostDirPath)))
case "linux": case "linux":