add hardlink test
This commit is contained in:
parent
cb1045db17
commit
d372a538ce
@ -64,6 +64,21 @@ func TestRootFS(t *testing.T) {
|
|||||||
file{Name: "/file", Uid: 1, Contents: bytes.NewBufferString("from 1")},
|
file{Name: "/file", Uid: 1, Contents: bytes.NewBufferString("from 1")},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "overwrite file with hardlink",
|
||||||
|
image: tarball{
|
||||||
|
file{Name: "layer0/layer.tar", Contents: tarball{
|
||||||
|
file{Name: "a"},
|
||||||
|
}},
|
||||||
|
file{Name: "layer1/layer.tar", Contents: tarball{
|
||||||
|
hardlink{Name: "a"},
|
||||||
|
}},
|
||||||
|
manifest{"layer0/layer.tar", "layer1/layer.tar"},
|
||||||
|
},
|
||||||
|
want: []extractable{
|
||||||
|
hardlink{Name: "a"},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "directory overwrite retains original dir",
|
name: "directory overwrite retains original dir",
|
||||||
image: tarball{
|
image: tarball{
|
||||||
|
Loading…
Reference in New Issue
Block a user