Skip to content

Commit

Permalink
Lint and unit test update
Browse files Browse the repository at this point in the history
  • Loading branch information
0marperez committed Feb 9, 2024
1 parent a5c4340 commit 2556f13
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public class UnsupportedSigningAlgorithmInterceptor : HttpInterceptor {
return Result.failure(
UnsupportedSigningAlgorithmException(
"${it.message!!} Please refer to the documentation on how to use the CRT signer: " +
"https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/use-services-s3-mrap.html#mrap-s3client-config",
"https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/use-services-s3-mrap.html#mrap-s3client-config",
it.signingAlgorithm,
).copyStackTrace(it)
).copyStackTrace(it),
)
}
}
Expand All @@ -36,8 +36,8 @@ public class UnsupportedSigningAlgorithmInterceptor : HttpInterceptor {
}

private fun UnsupportedSigningAlgorithmException.copyStackTrace(
exception: UnsupportedSigningAlgorithmException
exception: UnsupportedSigningAlgorithmException,
): UnsupportedSigningAlgorithmException {
this.stackTrace = exception.stackTrace
return this
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ class UnsupportedSigningAlgorithmInterceptorTest {
assertTrue(result.isFailure)
assertIs<UnsupportedSigningAlgorithmException>(exception)
assertEquals(exception.signingAlgorithm, AwsSigningAlgorithm.SIGV4_ASYMMETRIC)
assertEquals("SIGV4A support is not yet implemented for the default signer.", exception.message)
assertEquals(
"SIGV4A support is not yet implemented for the default signer. Please refer to the documentation on how to use the CRT signer: https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/use-services-s3-mrap.html#mrap-s3client-config",
exception.message,
)
}

@Test
Expand Down

0 comments on commit 2556f13

Please sign in to comment.