Skip to content

Commit

Permalink
Minimal modification of test times and clarification comment
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonc committed Oct 12, 2023
1 parent 6e51f25 commit cb8cabc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion slug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1256,8 +1256,10 @@ func verifyTimestamps(t *testing.T, src, dst string) {
t.Fatalf("dst file %q not found", dst)
}

// archive/tar purports to round timestamps to the nearest second so that behavior
// is duplicated here to test the restored timestamps.
sourceModTime := sourceInfo.ModTime().Round(time.Second)
destModTime := dstInfo.ModTime().Round(time.Second)
destModTime := dstInfo.ModTime()

if !sourceModTime.Equal(destModTime) {
t.Fatalf("source %q and dst %q do not have the same mtime (%q and %q, respectively)", src, dst, sourceModTime, destModTime)
Expand Down

0 comments on commit cb8cabc

Please sign in to comment.