Skip to content

Commit 9e09404

Browse files
committed
Normalize CRLF
1 parent 41cf492 commit 9e09404

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/SigV4aSignatureCalculatorTest.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class SigV4aSignatureCalculatorTest {
8383
val canonicalRequest = testDir.fileContents("header-canonical-request.txt")
8484
val actualStringToSign = SignatureCalculator.SigV4a.stringToSign(canonicalRequest, signingConfig)
8585

86-
assertEquals(expectedStringToSign, actualStringToSign)
86+
assertEquals(expectedStringToSign, actualStringToSign, "$testId failed")
8787
}
8888
}
8989

@@ -113,7 +113,11 @@ class SigV4aSignatureCalculatorTest {
113113
}
114114
}
115115

116-
private suspend fun String.fileContents(path: String): String = checkNotNull(PlatformProvider.System.readFileOrNull(this + path)?.decodeToString()) {
116+
private suspend fun String.fileContents(path: String): String = checkNotNull(
117+
PlatformProvider.System.readFileOrNull(this + path)
118+
?.decodeToString()
119+
?.replace("\\r\\n", "\\n")
120+
) {
117121
"Unable to read contents at ${this + path}"
118122
}
119123
}

0 commit comments

Comments
 (0)