aldettinger commented on code in PR #4404: URL: https://github.com/apache/camel-quarkus/pull/4404#discussion_r1085206628
########## integration-test-groups/aws2/aws2-cw/src/test/java/org/apache/camel/quarkus/component/aws2/cw/it/Aws2CwTest.java: ########## @@ -234,11 +237,51 @@ public void customClient() { RestAssured.given() .contentType("application/x-www-form-urlencoded; charset=utf-8") .header("customClientName", "customClient") + .header("returnExceptionMessage", true) .formParams(data) .post("/aws2-cw/send-metric-map/" + namespace) .then() .statusCode(200) .body(is("CloudWatchClientMock")); } + //test can be executed only if mock backend is used and no defsaultCredentialsprovider is defined inm the system + @ExtendWith(Aws2DefaultCredentialsProviderAvailabilityCondition.class) + @Test + public void defaultCredentialsProviderOnLocalstackTest() { + testDefaultCredentialsProvider(false, true).statusCode(200) + .body(startsWith(Aws2DefaultCredentialsProviderAvailabilityCondition.UNABLE_TO_LOAD_CREDENTIALS_MSG)); + ; + + testDefaultCredentialsProvider(true, false).statusCode(201); + } + + //caled twice from the defaultCredentialsProviderOnLocalstackTest + private ValidatableResponse testDefaultCredentialsProvider(boolean setCredenbtials, boolean returnErrorMessahe) { Review Comment: Bitpick++ Typos in variable names ########## integration-test-groups/aws2/aws2-cw/src/test/java/org/apache/camel/quarkus/component/aws2/cw/it/Aws2CwTest.java: ########## @@ -234,11 +237,51 @@ public void customClient() { RestAssured.given() .contentType("application/x-www-form-urlencoded; charset=utf-8") .header("customClientName", "customClient") + .header("returnExceptionMessage", true) .formParams(data) .post("/aws2-cw/send-metric-map/" + namespace) .then() .statusCode(200) .body(is("CloudWatchClientMock")); } + //test can be executed only if mock backend is used and no defsaultCredentialsprovider is defined inm the system + @ExtendWith(Aws2DefaultCredentialsProviderAvailabilityCondition.class) + @Test + public void defaultCredentialsProviderOnLocalstackTest() { + testDefaultCredentialsProvider(false, true).statusCode(200) + .body(startsWith(Aws2DefaultCredentialsProviderAvailabilityCondition.UNABLE_TO_LOAD_CREDENTIALS_MSG)); + ; + + testDefaultCredentialsProvider(true, false).statusCode(201); + } + + //caled twice from the defaultCredentialsProviderOnLocalstackTest + private ValidatableResponse testDefaultCredentialsProvider(boolean setCredenbtials, boolean returnErrorMessahe) { Review Comment: Nitpick++ Typos in variable names -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org