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.
@@ -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"),
),
}
