Skip to content

Commit 9c1141b

Browse files
committed
GoogleContainerTools#3158 - [Jib core] Tar archives with same contents are not reproducible
1 parent 75d321a commit 9c1141b

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

jib-core/src/test/java/com/google/cloud/tools/jib/tar/TarStreamBuilderTest.java

-3
Original file line numberDiff line numberDiff line change
@@ -218,21 +218,18 @@ private void verifyTarArchive(TarArchiveInputStream tarArchiveInputStream) throw
218218
// Verifies fileB was archived correctly.
219219
TarArchiveEntry headerFileB = tarArchiveInputStream.getNextTarEntry();
220220
Assert.assertEquals("crepecake", headerFileB.getName());
221-
Assert.assertEquals(Instant.EPOCH, headerFileB.getModTime().toInstant());
222221
byte[] fileBString = ByteStreams.toByteArray(tarArchiveInputStream);
223222
Assert.assertArrayEquals(fileBContents, fileBString);
224223

225224
// Verifies directoryA was archived correctly.
226225
TarArchiveEntry headerDirectoryA = tarArchiveInputStream.getNextTarEntry();
227226
Assert.assertEquals("some/path/to/", headerDirectoryA.getName());
228-
Assert.assertEquals(Instant.EPOCH, headerDirectoryA.getModTime().toInstant());
229227

230228
// Verifies the long file was archived correctly.
231229
TarArchiveEntry headerFileALong = tarArchiveInputStream.getNextTarEntry();
232230
Assert.assertEquals(
233231
"some/really/long/path/that/exceeds/100/characters/abcdefghijklmnopqrstuvwxyz0123456789012345678901234567890",
234232
headerFileALong.getName());
235-
Assert.assertEquals(Instant.EPOCH, headerFileALong);
236233
byte[] fileALongString = ByteStreams.toByteArray(tarArchiveInputStream);
237234
Assert.assertArrayEquals(fileAContents, fileALongString);
238235

0 commit comments

Comments
 (0)