This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch CAMEL-21179-hashicorp in repository https://gitbox.apache.org/repos/asf/camel.git
commit 88f94d0091adf1a350f7f6e3fb404e7e7eb7ad00 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Mon Sep 9 14:35:45 2024 +0200 CAMEL-21179 - Secret Properties Functions: Supporting secret name containing "/" - Hashicorp Vault Signed-off-by: Andrea Cosentino <anco...@gmail.com> --- .../HashicorpVaultPropertiesSourceNoEnvTestIT.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/components/camel-hashicorp-vault/src/test/java/org/apache/camel/component/hashicorp/vault/integration/HashicorpVaultPropertiesSourceNoEnvTestIT.java b/components/camel-hashicorp-vault/src/test/java/org/apache/camel/component/hashicorp/vault/integration/HashicorpVaultPropertiesSourceNoEnvTestIT.java index 75262b38e0a..b1b1ae289f6 100644 --- a/components/camel-hashicorp-vault/src/test/java/org/apache/camel/component/hashicorp/vault/integration/HashicorpVaultPropertiesSourceNoEnvTestIT.java +++ b/components/camel-hashicorp-vault/src/test/java/org/apache/camel/component/hashicorp/vault/integration/HashicorpVaultPropertiesSourceNoEnvTestIT.java @@ -510,6 +510,27 @@ public class HashicorpVaultPropertiesSourceNoEnvTestIT extends CamelTestSupport MockEndpoint.assertIsSatisfied(context); } + @Test + public void testPropertiesWithVersionFieldAndDefaultValueWithSlashInName() throws Exception { + context.getVaultConfiguration().hashicorp().setToken(System.getProperty("camel.vault.hashicorp.token")); + context.getVaultConfiguration().hashicorp().setHost(System.getProperty("camel.vault.hashicorp.host")); + context.getVaultConfiguration().hashicorp().setPort(System.getProperty("camel.vault.hashicorp.port")); + context.getVaultConfiguration().hashicorp().setScheme(System.getProperty("camel.vault.hashicorp.scheme")); + context.addRoutes(new RouteBuilder() { + @Override + public void configure() { + from("direct:version").setBody(simple("{{hashicorp:secret:production/secrets/hello#id:pippo@1}}")) + .to("mock:bar"); + } + }); + context.start(); + + getMockEndpoint("mock:bar").expectedBodiesReceived("21"); + + template.sendBody("direct:version", "Hello World"); + MockEndpoint.assertIsSatisfied(context); + } + @Test public void testPropertiesWithDoubleEngines() throws Exception { context.getVaultConfiguration().hashicorp().setToken(System.getProperty("camel.vault.hashicorp.token"));