JiriOndrusek opened a new pull request, #4474:
URL: https://github.com/apache/camel-quarkus/pull/4474

   fixes https://github.com/apache/camel-quarkus/issues/4442
   (follows https://github.com/apache/camel-quarkus/issues/4401)
   
   PR extends `camel-quarkus-integration-tests-support-aws2` to cover tests 
with default credentials provider without a lot of changes in each aws2 test 
module.
   To fully use the support there are a few requirements for each aws2 test 
module:
   
   1. Add  dependencies of both flavors (of 
`camel-quarkus-integration-tests-support-aws2`) into the pom:
   
   ```
           <dependency>
               <groupId>org.apache.camel.quarkus</groupId>
               
<artifactId>camel-quarkus-integration-tests-support-aws2</artifactId>
           </dependency>
           <dependency>
               <groupId>org.apache.camel.quarkus</groupId>
               
<artifactId>camel-quarkus-integration-tests-support-aws2</artifactId>
               <type>test-jar</type>
               <scope>test</scope>
           </dependency>
   ```
   
   2. Extend `BaseAws2Resource` by the resource class.
   3. Extend `BaseAWs2TestSupport` by the test class.
   4. Add parameter `"?useDefaultCredentialsProvider=" + useDefaultCredentials` 
into endpoint url called from the resource.
   5. Implement simple test method (overriding) 
`testMethodForDefaultCredentialsProvider()`
   
   If all items are satisfied, 2 new tests are executed for the test module 
(`failingDefaultCredentialsProviderTest` and 
`successfulDefaultCredentialsProviderTest`).
   One covers positive scenario, the other negative scenario.
   
   Be aware that the tests are executed only with **mocked backend**, **without 
quarkus client**, and only in case that **awsDefaultCredentialsProvider is not 
defined on the system**. Otherwise tests are skipped. See 
`Aws2DefaultCredentialsProviderAvailabilityCondition`.
   
    
   
   - Cw: Tests were refactored to use helper methods from aws-support.
   - Kinesis: Test class was split into kinesis & firehose test classes to 
cover default credentials testing for  both extensions.
   - S3: Name of the rest resource used for testing was renamed to the same 
pattern as other aws2 testing extensions.
   
   <!-- Uncomment and fill this section if your PR is not trivial
   [ ] An issue should be filed for the change unless this is a trivial change 
(fixing a typo or similar). One issue should ideally be fixed by not more than 
one commit and the other way round, each commit should fix just one issue, 
without pulling in other changes.
   [ ] Each commit in the pull request should have a meaningful and properly 
spelled subject line and body. Copying the title of the associated issue is 
typically enough. Please include the issue number in the commit message 
prefixed by #.
   [ ] The pull request description should explain what the pull request does, 
how, and why. If the info is available in the associated issue or some other 
external document, a link is enough.
   [ ] Phrases like Fix #<issueNumber> or Fixes #<issueNumber> will auto-close 
the named issue upon merging the pull request. Using them is typically a good 
idea.
   [ ] Please run mvn process-resources -Pformat (and amend the changes if 
necessary) before sending the pull request.
   [ ] Contributor guide is your good friend: 
https://camel.apache.org/camel-quarkus/latest/contributor-guide.html
   -->


-- 
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

Reply via email to