This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 603922847800b97a1c46314a81f3b920c82f66ac Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Thu Aug 27 08:52:43 2020 +0200 CAMEL-15374 - Improved tests --- .../org/apache/camel/component/aws2/sts/STS2ProducerSpringTest.java | 3 ++- .../java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerSpringTest.java b/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerSpringTest.java index c5b688e..43d91a4 100644 --- a/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerSpringTest.java +++ b/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerSpringTest.java @@ -69,7 +69,7 @@ public class STS2ProducerSpringTest extends CamelSpringTestSupport { GetSessionTokenResponse resultGet = (GetSessionTokenResponse) exchange.getIn().getBody(); assertEquals("xxx", resultGet.credentials().accessKeyId()); } - + public void stsGetFederationTokenTest() throws Exception { mock.expectedMessageCount(1); @@ -77,6 +77,7 @@ public class STS2ProducerSpringTest extends CamelSpringTestSupport { @Override public void process(Exchange exchange) throws Exception { exchange.getIn().setHeader(STS2Constants.OPERATION, STS2Operations.getFederationToken); + exchange.getIn().setHeader(STS2Constants.FEDERATED_NAME, "federation-account"); } }); diff --git a/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java b/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java index fe0489c..eed12e7 100644 --- a/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java +++ b/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java @@ -82,6 +82,7 @@ public class STS2ProducerTest extends CamelTestSupport { @Override public void process(Exchange exchange) throws Exception { exchange.getIn().setHeader(STS2Constants.OPERATION, STS2Operations.getFederationToken); + exchange.getIn().setHeader(STS2Constants.FEDERATED_NAME, "federation-account"); } });