From 2b186fd1f6565e185a9c4a50023fd1fe28c82f0e Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Thu, 30 Mar 2017 16:47:05 +0200 Subject: [PATCH] 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 --- archive/tar_test.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/archive/tar_test.go b/archive/tar_test.go index 144cd7f28..db216c0df 100644 --- a/archive/tar_test.go +++ b/archive/tar_test.go @@ -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"), ), }