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 2022/03/01 14:10:55 UTC

[camel] 12/14: CAMEL-17684 - Support ability to load properties from Vault/Secrets cloud services - GCP Secrets Manager

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit a0c2349667b1d2424414a1eb55f6b9243adc413f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Mar 1 14:54:51 2022 +0100

    CAMEL-17684 - Support ability to load properties from Vault/Secrets cloud services - GCP Secrets Manager
---
 .../GoogleSecretManagerPropertiesSourceTestIT.java   | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/components/camel-google/camel-google-secret-manager/src/test/java/org/apache/camel/component/google/secret/manager/integration/GoogleSecretManagerPropertiesSourceTestIT.java b/components/camel-google/camel-google-secret-manager/src/test/java/org/apache/camel/component/google/secret/manager/integration/GoogleSecretManagerPropertiesSourceTestIT.java
index 7321799..e574c90 100644
--- a/components/camel-google/camel-google-secret-manager/src/test/java/org/apache/camel/component/google/secret/manager/integration/GoogleSecretManagerPropertiesSourceTestIT.java
+++ b/components/camel-google/camel-google-secret-manager/src/test/java/org/apache/camel/component/google/secret/manager/integration/GoogleSecretManagerPropertiesSourceTestIT.java
@@ -167,4 +167,24 @@ public class GoogleSecretManagerPropertiesSourceTestIT extends CamelTestSupport
             assertMockEndpointsSatisfied();
         });
     }
+
+    @EnabledIfEnvironmentVariable(named = "CAMEL_VAULT_GCP_SERVICE_ACCOUNT_KEY", matches = ".*")
+    @EnabledIfEnvironmentVariable(named = "CAMEL_VAULT_GCP_PROJECT_ID", matches = ".*")
+    @Test
+    public void testComplexSimpleDefaultValueExceptionFunction() throws Exception {
+        context.addRoutes(new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:username").setBody(simple("{{aws:test-3:admin}}")).to("mock:bar");
+                from("direct:password").setBody(simple("{{aws:test-1:secret}}")).to("mock:bar");
+            }
+        });
+        context.start();
+
+        getMockEndpoint("mock:bar").expectedBodiesReceived("admin", "secret");
+
+        template.sendBody("direct:username", "Hello World");
+        template.sendBody("direct:password", "Hello World");
+        assertMockEndpointsSatisfied();
+    }
 }