You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/09/29 07:27:33 UTC

[camel] 02/02: Camel-AWS2-KMS: Fixed localstack listKeys test

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 184dba0907af6addfad4b8d3c204f3d648c76109
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Sep 29 09:26:50 2020 +0200

    Camel-AWS2-KMS: Fixed localstack listKeys test
---
 .../component/aws2/kms/localstack/KmsListKeysLocalstackTest.java    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/components/camel-aws2-kms/src/test/java/org/apache/camel/component/aws2/kms/localstack/KmsListKeysLocalstackTest.java b/components/camel-aws2-kms/src/test/java/org/apache/camel/component/aws2/kms/localstack/KmsListKeysLocalstackTest.java
index 187bad5..cd74588 100644
--- a/components/camel-aws2-kms/src/test/java/org/apache/camel/component/aws2/kms/localstack/KmsListKeysLocalstackTest.java
+++ b/components/camel-aws2-kms/src/test/java/org/apache/camel/component/aws2/kms/localstack/KmsListKeysLocalstackTest.java
@@ -24,11 +24,9 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.aws2.kms.KMS2Constants;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.jupiter.api.Test;
-import software.amazon.awssdk.services.kms.model.CreateKeyResponse;
 import software.amazon.awssdk.services.kms.model.ListKeysResponse;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 public class KmsListKeysLocalstackTest extends Aws2KmsBaseTest {
@@ -50,7 +48,7 @@ public class KmsListKeysLocalstackTest extends Aws2KmsBaseTest {
                 exchange.getIn().setHeader(KMS2Constants.OPERATION, "createKey");
             }
         });
-        
+
         template.send("direct:listKeys", new Processor() {
 
             @Override
@@ -73,7 +71,7 @@ public class KmsListKeysLocalstackTest extends Aws2KmsBaseTest {
                         = "aws2-kms://default?operation=createKey";
                 String listKeys = "aws2-kms://default?operation=listKeys";
                 from("direct:createKey").to(awsEndpoint);
-                from("direct:listKeys").to(listKeys);
+                from("direct:listKeys").to(listKeys).to("mock:result");
             }
         };
     }