update the local tests with new hashes
diff --git a/tests/integrationtests/jvm/JvmBasicLocalTests.kt b/tests/integrationtests/jvm/JvmBasicLocalTests.kt
index ccb018e..384a71d 100644
--- a/tests/integrationtests/jvm/JvmBasicLocalTests.kt
+++ b/tests/integrationtests/jvm/JvmBasicLocalTests.kt
@@ -23,14 +23,16 @@
/*
* (hsyed) This test is running locally because things hash differently on the ci servers. Don't have the time to
* look into it.
+ *
+ * The hashes can change between kotlin compiler versions so this approach isn't sustainable.
*/
@Test
fun testJarNormalization() {
jarTestCase(
name = "test_module_name_lib.jar",
- description = "Builder jars should be normalized with the same timestamps as singlejar and including stamp data"
+ description = "Builder jars should be normalized with and include stamp data"
) {
- validateFileSha256("513d14b29eb1b95b97bf7d34e2126a716c7d1012b259b5021c16b99ca82feeb5")
+ validateFileSha256("f26827dd09160adb436b31a12aa3b86f6da8ae1c317150c264ed8d1427a68dea")
assertManifestStamped()
assertEntryCompressedAndNormalizedTimestampYear("helloworld/Main.class")
}
@@ -38,10 +40,12 @@
name = "test_embed_resources.jar",
description = "Merging resources into the main output jar should still result in a normalized jar"
) {
- validateFileSha256("2d9175e9ecc6b9bc62f59ce861e9b67c6f64dd581f6cbd986c0a694b89e310b1")
+ validateFileSha256("270ea8758f38d9ef15013aea222cc8f609affaf9acc2f2cd206dbd73a4872082")
assertManifestStamped()
assertEntryCompressedAndNormalizedTimestampYear("testresources/AClass.class")
- assertEntryCompressedAndNormalizedTimestampYear("tests/integrationtests/jvm/basic/testresources/resources/one/two/aFile.txt")
+ assertEntryCompressedAndNormalizedTimestampYear(
+ "tests/integrationtests/jvm/basic/testresources/resources/one/two/aFile.txt"
+ )
}
}
}
\ No newline at end of file
diff --git a/tests/rules/AssertionTestCase.kt b/tests/rules/AssertionTestCase.kt
index 2b6cf2d..3ecc098 100644
--- a/tests/rules/AssertionTestCase.kt
+++ b/tests/rules/AssertionTestCase.kt
@@ -38,9 +38,9 @@
private lateinit var currentFile: File
private val testRunfileRoot: Path = Paths.get(root).also {
- it.toFile().also {
- assert(it.exists()) { "runfile directory $root does not exist" }
- assert(it.isDirectory) { "runfile directory $root is not a directory" }
+ it.toFile().also { file ->
+ assert(file.exists()) { "runfile directory $root does not exist" }
+ assert(file.isDirectory) { "runfile directory $root is not a directory" }
}
}
@@ -97,7 +97,7 @@
protected fun validateFileSha256(expected: String) {
val result = Hashing.sha256().hashBytes(Files.readAllBytes(currentFile.toPath())).toString()
- assertEquals(expected, result, "files did not hash as expected")
+ assertEquals(expected, result, "file $currentFile did not hash as expected")
}
protected fun JarFile.assertDoesNotContainEntries(vararg entries: String) {