Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6060e0e
CAMEL-17763: cleaned up unused exceptions in camel-aws-secrets-manager
orpiske Mar 8, 2022
26932ae
CAMEL-17763: cleaned up unused exceptions in camel-aws-xray
orpiske Mar 8, 2022
98f2f74
CAMEL-17763: cleaned up unused exceptions in camel-aws2-athena
orpiske Mar 8, 2022
2920cdf
CAMEL-17763: cleaned up unused exceptions in camel-aws2-cw
orpiske Mar 8, 2022
486558d
CAMEL-17763: cleaned up unused exceptions in camel-aws2-ddb
orpiske Mar 8, 2022
51dfb05
CAMEL-17763: cleaned up unused exceptions in camel-aws2-ec2
orpiske Mar 8, 2022
4cdfff8
CAMEL-17763: cleaned up unused exceptions in camel-aws2-ecs
orpiske Mar 8, 2022
496013b
CAMEL-17763: cleaned up unused exceptions in camel-aws2-eks
orpiske Mar 8, 2022
95e5303
CAMEL-17763: cleaned up unused exceptions in camel-aws2-eventbridge
orpiske Mar 8, 2022
e4d43f6
CAMEL-17763: cleaned up unused exceptions in camel-aws2-iam
orpiske Mar 8, 2022
1c8e1d6
CAMEL-17763: cleaned up unused exceptions in camel-aws2-kinesis
orpiske Mar 8, 2022
51956e2
CAMEL-17763: cleaned up unused exceptions in camel-aws2-kms
orpiske Mar 8, 2022
58747be
CAMEL-17763: cleaned up unused exceptions in camel-aws2-lambda
orpiske Mar 8, 2022
3aeacaf
CAMEL-17763: cleaned up unused exceptions in camel-aws2-mq
orpiske Mar 8, 2022
d0211e4
CAMEL-17763: cleaned up unused exceptions in camel-aws2-msk
orpiske Mar 8, 2022
a7181cb
CAMEL-17763: cleaned up unused exceptions in camel-aws2-s3
orpiske Mar 8, 2022
0e67b58
CAMEL-17763: cleaned up unused exceptions in camel-aws2-ses
orpiske Mar 8, 2022
162d7c7
CAMEL-17763: cleaned up unused exceptions in camel-aws2-sns
orpiske Mar 8, 2022
f16e1eb
CAMEL-17763: cleaned up unused exceptions in camel-aws2-sqs
orpiske Mar 8, 2022
96e2313
CAMEL-17763: cleaned up unused exceptions in camel-aws2-sts
orpiske Mar 8, 2022
73eb52c
CAMEL-17763: cleaned up unused exceptions in camel-aws2-translate
orpiske Mar 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public class SecretsManagerCreateSecretProducerLocalstackIT extends AwsSecretsMa
private MockEndpoint mock;

@Test
public void createSecretTest() throws Exception {
public void createSecretTest() {

mock.expectedMessageCount(1);
Exchange exchange = template.request("direct:createSecret", new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
public void process(Exchange exchange) {
exchange.getIn().setHeader(SecretsManagerConstants.SECRET_NAME, "TestSecret4");
exchange.getIn().setBody("Body");
}
Expand All @@ -49,10 +49,10 @@ public void process(Exchange exchange) throws Exception {
}

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:createSecret")
.to("aws-secrets-manager://test?operation=createSecret")
.to("mock:result");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public class SecretsManagerDeleteSecretProducerLocalstackIT extends AwsSecretsMa
private MockEndpoint mock;

@Test
public void createSecretTest() throws Exception {
public void createSecretTest() {

mock.expectedMessageCount(1);
Exchange exchange = template.request("direct:createSecret", new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
public void process(Exchange exchange) {
exchange.getIn().setHeader(SecretsManagerConstants.SECRET_NAME, "TestSecret4");
exchange.getIn().setBody("Body");
}
Expand All @@ -51,7 +51,7 @@ public void process(Exchange exchange) throws Exception {

exchange = template.request("direct:deleteSecret", new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
public void process(Exchange exchange) {
exchange.getIn().setHeader(SecretsManagerConstants.SECRET_ID, resultGet.arn());
}
});
Expand All @@ -62,10 +62,10 @@ public void process(Exchange exchange) throws Exception {
}

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:createSecret")
.to("aws-secrets-manager://test?operation=createSecret");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public class SecretsManagerDescribeSecretProducerLocalstackIT extends AwsSecrets
private MockEndpoint mock;

@Test
public void createSecretTest() throws Exception {
public void createSecretTest() {

mock.expectedMessageCount(1);
Exchange exchange = template.request("direct:createSecret", new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
public void process(Exchange exchange) {
exchange.getIn().setHeader(SecretsManagerConstants.SECRET_NAME, "TestSecret4");
exchange.getIn().setBody("Body");
}
Expand All @@ -52,7 +52,7 @@ public void process(Exchange exchange) throws Exception {

exchange = template.request("direct:describeSecret", new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
public void process(Exchange exchange) {
exchange.getIn().setHeader(SecretsManagerConstants.SECRET_ID, resultGet.arn());
}
});
Expand All @@ -64,10 +64,10 @@ public void process(Exchange exchange) throws Exception {
}

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:createSecret")
.to("aws-secrets-manager://test?operation=createSecret");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public class SecretsManagerGetSecretProducerLocalstackIT extends AwsSecretsManag
private MockEndpoint mock;

@Test
public void createSecretTest() throws Exception {
public void createSecretTest() {

mock.expectedMessageCount(1);
Exchange exchange = template.request("direct:createSecret", new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
public void process(Exchange exchange) {
exchange.getIn().setHeader(SecretsManagerConstants.SECRET_NAME, "TestSecret4");
exchange.getIn().setBody("Body");
}
Expand All @@ -50,7 +50,7 @@ public void process(Exchange exchange) throws Exception {

exchange = template.request("direct:getSecret", new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
public void process(Exchange exchange) {
exchange.getIn().setHeader(SecretsManagerConstants.SECRET_ID, resultGet.arn());
}
});
Expand All @@ -61,10 +61,10 @@ public void process(Exchange exchange) throws Exception {
}

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:createSecret")
.to("aws-secrets-manager://test?operation=createSecret");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void testFunction() throws Exception {
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:start").setBody(simple("{{aws:hello}}")).to("mock:bar");
}
});
Expand All @@ -62,7 +62,7 @@ public void testComplexPropertiesFunction() throws Exception {
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:username").setBody(simple("{{aws:database_sample:username}}")).to("mock:bar");
from("direct:password").setBody(simple("{{aws:database_sample:password}}")).to("mock:bar");
}
Expand All @@ -83,7 +83,7 @@ public void testComplexCustomPropertiesFunction() throws Exception {
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:username").setBody(simple("{{aws:normalkey:username}}")).to("mock:bar");
from("direct:password").setBody(simple("{{aws:normalkey:password}}")).to("mock:bar");
}
Expand All @@ -98,14 +98,14 @@ public void configure() throws Exception {
}

@Test
public void testSecretNotFoundFunction() throws Exception {
public void testSecretNotFoundFunction() {
context.getVaultConfiguration().aws().setAccessKey(System.getProperty("camel.vault.aws.accessKey"));
context.getVaultConfiguration().aws().setSecretKey(System.getProperty("camel.vault.aws.secretKey"));
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
Exception exception = assertThrows(FailedToCreateRouteException.class, () -> {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:start").setBody(simple("{{aws:testExample}}")).to("mock:bar");
}
});
Expand All @@ -120,14 +120,14 @@ public void configure() throws Exception {
}

@Test
public void testComplexNoSubkeyPropertiesFunction() throws Exception {
public void testComplexNoSubkeyPropertiesFunction() {
context.getVaultConfiguration().aws().setAccessKey(System.getProperty("camel.vault.aws.accessKey"));
context.getVaultConfiguration().aws().setSecretKey(System.getProperty("camel.vault.aws.secretKey"));
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
Exception exception = assertThrows(FailedToCreateRouteException.class, () -> {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:username").setBody(simple("{{aws:database_sample:not_existent}}")).to("mock:bar");
}
});
Expand All @@ -147,7 +147,7 @@ public void testComplexCustomPropertiesDefaultValueFunction() throws Exception {
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:username").setBody(simple("{{aws:postgresql/additional1:admin}}")).to("mock:bar");
from("direct:password").setBody(simple("{{aws:postgresql/additional2:secret}}")).to("mock:bar");
}
Expand All @@ -168,7 +168,7 @@ public void testComplexCustomPropertiesDefaultValueExceptionFunction() throws Ex
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:username").setBody(simple("{{aws:test-3/additional1:admin}}")).to("mock:bar");
from("direct:password").setBody(simple("{{aws:test-3/additional2:secret}}")).to("mock:bar");
}
Expand All @@ -183,14 +183,14 @@ public void configure() throws Exception {
}

@Test
public void testComplexCustomPropertiesExceptionFunction() throws Exception {
public void testComplexCustomPropertiesExceptionFunction() {
context.getVaultConfiguration().aws().setAccessKey(System.getProperty("camel.vault.aws.accessKey"));
context.getVaultConfiguration().aws().setSecretKey(System.getProperty("camel.vault.aws.secretKey"));
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
Exception exception = assertThrows(FailedToCreateRouteException.class, () -> {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:username").setBody(simple("{{aws:test-3/additional1}}")).to("mock:bar");
from("direct:password").setBody(simple("{{aws:test-3/additional2}}")).to("mock:bar");
}
Expand All @@ -212,7 +212,7 @@ public void testComplexSimpleDefaultValueExceptionFunction() throws Exception {
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:username").setBody(simple("{{aws:test-3:admin}}")).to("mock:bar");
from("direct:password").setBody(simple("{{aws:test-1:secret}}")).to("mock:bar");
}
Expand All @@ -227,14 +227,14 @@ public void configure() throws Exception {
}

@Test
public void testComplexSimpleNoDefaultValueExceptionFunction() throws Exception {
public void testComplexSimpleNoDefaultValueExceptionFunction() {
context.getVaultConfiguration().aws().setAccessKey(System.getProperty("camel.vault.aws.accessKey"));
context.getVaultConfiguration().aws().setSecretKey(System.getProperty("camel.vault.aws.secretKey"));
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
Exception exception = assertThrows(FailedToCreateRouteException.class, () -> {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:username").setBody(simple("{{aws:secretsuper}}")).to("mock:bar");
}
});
Expand All @@ -248,14 +248,14 @@ public void configure() throws Exception {
}

@Test
public void testComplexCustomPropertiesNoDefaultValueFunction() throws Exception {
public void testComplexCustomPropertiesNoDefaultValueFunction() {
context.getVaultConfiguration().aws().setAccessKey(System.getProperty("camel.vault.aws.accessKey"));
context.getVaultConfiguration().aws().setSecretKey(System.getProperty("camel.vault.aws.secretKey"));
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
Exception exception = assertThrows(FailedToCreateRouteException.class, () -> {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:username").setBody(simple("{{aws:postgresql/additional1}}")).to("mock:bar");
from("direct:password").setBody(simple("{{aws:postgresql/additional2}}")).to("mock:bar");
}
Expand All @@ -277,7 +277,7 @@ public void testComplexCustomPropertiesNotExistentDefaultValueFunction() throws
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:username").setBody(simple("{{aws:newsecret/additional1:admin}}")).to("mock:bar");
}
});
Expand All @@ -296,7 +296,7 @@ public void testPropertiesWithDefaultFunction() throws Exception {
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:username").setBody(simple("{{aws:postgresql/username:oscerd}}")).to("mock:bar");
from("direct:password").setBody(simple("{{aws:postgresql/password:password}}")).to("mock:bar");
}
Expand All @@ -317,7 +317,7 @@ public void testPropertiesWithDefaultNotExistentFunction() throws Exception {
context.getVaultConfiguration().aws().setRegion(System.getProperty("camel.vault.aws.region"));
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:username").setBody(simple("{{aws:db_sample/username:oscerd}}")).to("mock:bar");
from("direct:password").setBody(simple("{{aws:db_sample/password:password}}")).to("mock:bar");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public class SecretsManagerProducerListSecretsLocalstackIT extends AwsSecretsMan
private MockEndpoint mock;

@Test
public void createSecretTest() throws Exception {
public void createSecretTest() {

mock.expectedMessageCount(1);
Exchange exchange = template.request("direct:createSecret", new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
public void process(Exchange exchange) {
exchange.getIn().setHeader(SecretsManagerConstants.SECRET_NAME, "TestSecret4");
exchange.getIn().setBody("Body");
}
Expand All @@ -52,7 +52,7 @@ public void process(Exchange exchange) throws Exception {

exchange = template.request("direct:listSecrets", new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
public void process(Exchange exchange) {
exchange.getIn().setHeader(SecretsManagerConstants.SECRET_ID, resultGet.arn());
}
});
Expand All @@ -63,10 +63,10 @@ public void process(Exchange exchange) throws Exception {
}

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
public void configure() {
from("direct:createSecret")
.to("aws-secrets-manager://test?operation=createSecret");

Expand Down
Loading