Skip to content

Commit

Permalink
Rename symlink testdata to symlinks for consistency.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 681857199
  • Loading branch information
Yousef Alowayed authored and copybara-github committed Oct 3, 2024
1 parent f6ac4be commit 3b0c869
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Binary file not shown.
10 changes: 5 additions & 5 deletions artifact/image/unpack/unpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func TestUnpackSquashed(t *testing.T) {
os.WriteFile(filepath.Join(dir, "secret.txt"), []byte("some secret\n"), 0644)
return innerDir
}(),
image: mustImageFromPath(t, filepath.Join("testdata", "symlink.tar")),
image: mustImageFromPath(t, filepath.Join("testdata", "symlinks.tar")),
want: map[string]contentAndMode{
filepath.FromSlash("dir1/absolute-symlink.txt"): {content: "sample text\n", mode: fs.ModeSymlink | fs.FileMode(0777)},
filepath.FromSlash("dir1/chain-symlink.txt"): {content: "sample text\n", mode: fs.ModeSymlink | fs.FileMode(0777)},
Expand All @@ -225,7 +225,7 @@ func TestUnpackSquashed(t *testing.T) {
}),
),
dir: mustMkdirTemp(t),
image: mustImageFromPath(t, filepath.Join("testdata", "symlink.tar")),
image: mustImageFromPath(t, filepath.Join("testdata", "symlinks.tar")),
want: map[string]contentAndMode{
filepath.FromSlash("dir1/absolute-symlink.txt"): {content: "sample text\n", mode: fs.ModeSymlink | fs.FileMode(0777)},
filepath.FromSlash("dir1/sample.txt"): {content: "sample text\n", mode: fs.FileMode(0644)},
Expand All @@ -238,7 +238,7 @@ func TestUnpackSquashed(t *testing.T) {
}),
),
dir: mustMkdirTemp(t),
image: mustImageFromPath(t, filepath.Join("testdata", "symlink.tar")),
image: mustImageFromPath(t, filepath.Join("testdata", "symlinks.tar")),
want: map[string]contentAndMode{
filepath.FromSlash("dir1/absolute-symlink.txt"): {content: "sample text\n", mode: fs.ModeSymlink | fs.FileMode(0777)},
filepath.FromSlash("dir1/chain-symlink.txt"): {content: "sample text\n", mode: fs.ModeSymlink | fs.FileMode(0777)},
Expand All @@ -252,7 +252,7 @@ func TestUnpackSquashed(t *testing.T) {
}),
),
dir: mustMkdirTemp(t),
image: mustImageFromPath(t, filepath.Join("testdata", "symlink.tar")),
image: mustImageFromPath(t, filepath.Join("testdata", "symlinks.tar")),
want: map[string]contentAndMode{},
}, {
name: "image built from scratch (not through a tool like Docker)",
Expand Down Expand Up @@ -386,7 +386,7 @@ func TestUnpackLayers(t *testing.T) {
name: "symlink",
cfg: unpack.DefaultUnpackerConfig(),
dir: mustMkdirTemp(t),
image: mustImageFromPath(t, filepath.Join("testdata", "symlink.tar")),
image: mustImageFromPath(t, filepath.Join("testdata", "symlinks.tar")),
want: []digestAndContent{{
digest: "SQUASHED",
content: map[string]contentAndMode{
Expand Down

0 comments on commit 3b0c869

Please sign in to comment.