Update tar test to avoid touching before hardlinking
Touching the file before hardlinking was covering up a bug in how hard links are handled in tar. Without the touch the hardlink should still be included and both files should hardlink after the tar is applied. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
parent
8affca40bb
commit
2b186fd1f6
@ -6,7 +6,6 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
_ "crypto/sha256"
|
||||
|
||||
@ -67,8 +66,6 @@ func TestDiffApply(t *testing.T) {
|
||||
fstest.RemoveAll("/home"),
|
||||
fstest.CreateDir("/home/derek", 0700),
|
||||
fstest.CreateFile("/home/derek/.bashrc", []byte("#not going away\n"), 0640),
|
||||
// "/etc/hosts" must be touched to be hardlinked in same layer
|
||||
fstest.Chtime("/etc/hosts", time.Now()),
|
||||
fstest.Link("/etc/hosts", "/etc/hosts.allow"),
|
||||
),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user