Skip to content

Commit

Permalink
Merge branch 'release-v1.17' into sync-konflux-release-v1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
matejvasek authored Jan 31, 2025
2 parents 27310be + d6f2b18 commit fe7dffb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
13 changes: 12 additions & 1 deletion pkg/oci/containerize_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package oci

import (
"errors"
"os"
"path/filepath"
"runtime"
"testing"
Expand All @@ -10,7 +12,16 @@ import (
// links which are absolute or refer to targets outside the given root, in
// addition to the basic job of returning the value of reading the link.
func Test_validatedLinkTarget(t *testing.T) {
root := "testdata/test-links"
root := filepath.Join("testdata", "test-links")

err := os.Symlink("/var/example/absolute/link", filepath.Join(root, "absoluteLink"))
if err != nil && !errors.Is(err, os.ErrExist) {
t.Fatal(err)
}
err = os.Symlink("c://some/absolute/path", filepath.Join(root, "absoluteLinkWindows"))
if err != nil && !errors.Is(err, os.ErrExist) {
t.Fatal(err)
}

// Windows-specific absolute link and link target values:
absoluteLink := "absoluteLink"
Expand Down
1 change: 0 additions & 1 deletion pkg/oci/testdata/test-links/absoluteLink

This file was deleted.

1 change: 0 additions & 1 deletion pkg/oci/testdata/test-links/absoluteLinkWindows

This file was deleted.

0 comments on commit fe7dffb

Please sign in to comment.