unittests: Fixes TestReplaceFile for Windows

Currently, the test TestReplaceFile/neither_parent_nor_file_exists fails
because the error encountered doesn't match the expected error.

On Windows, if a file is missing, the encountered error is:

The system cannot find the file specified.

And if a folder / parent folder is missing, this error is encoutered instead:

The system cannot find the path specified.
This commit is contained in:
Claudiu Belu 2022-12-07 11:36:13 +00:00
parent 72acaad839
commit ba1195afeb

View File

@ -313,7 +313,7 @@ func TestReplaceFile(t *testing.T) {
return nil
},
desc: "neither parent nor file exists",
err: missingFileError,
err: missingFolderError,
},
}
for _, c := range cases {