diff --git a/pkg/oci/containerize_test.go b/pkg/oci/containerize_test.go index cd587b06d4..c3ce7ac1e8 100644 --- a/pkg/oci/containerize_test.go +++ b/pkg/oci/containerize_test.go @@ -41,11 +41,10 @@ func Test_validateLink(t *testing.T) { } }) } + // Run a windows-specific absolute path test - // Note this technically succeeds on unix systems, but wrapping in - // an runtime check seems like a good idea to make it more clear. if runtime.GOOS != "windows" { - path := "c://some/absolute/path" + path := "testdata/test-links/absoluteLinkWindows" info, err := os.Lstat(path) if err != nil { t.Fatal(err) diff --git a/pkg/oci/testdata/test-links/absoluteLinkWindows b/pkg/oci/testdata/test-links/absoluteLinkWindows new file mode 120000 index 0000000000..c3aaf3f5c3 --- /dev/null +++ b/pkg/oci/testdata/test-links/absoluteLinkWindows @@ -0,0 +1 @@ +c://some/absolute/path \ No newline at end of file