Skip to content

Commit 7ef43b9

Browse files
authored
feat: Adding E2E metric test for RDS database interactions (#127)
Reapplies #102
1 parent b3d7e7c commit 7ef43b9

File tree

6 files changed

+450
-0
lines changed

6 files changed

+450
-0
lines changed

.github/workflows/java-eks-e2e-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ jobs:
374374
--service-name sample-application-${{ env.TESTING_ID }}
375375
--remote-service-name sample-remote-application-${{ env.TESTING_ID }}
376376
--remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }}
377+
--remote-resource-identifier "information_schema|${{env.RDS_MYSQL_CLUSTER_ENDPOINT}}|3306"
377378
--query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }}
378379
--rollup'
379380

validator/src/main/java/com/amazon/aoc/App.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ public class App implements Callable<Integer> {
7575
@CommandLine.Option(names = {"--remote-service-deployment-name"})
7676
private String remoteServiceDeploymentName;
7777

78+
@CommandLine.Option(names = {"--remote-resource-identifier"})
79+
private String remoteResourceIdentifier;
80+
7881
@CommandLine.Option(names = {"--endpoint"})
7982
private String endpoint;
8083

@@ -170,6 +173,7 @@ public Integer call() throws Exception {
170173
context.setServiceName(this.serviceName);
171174
context.setRemoteServiceName(this.remoteServiceName);
172175
context.setRemoteServiceDeploymentName(this.remoteServiceDeploymentName);
176+
context.setRemoteResourceIdentifier(this.remoteResourceIdentifier);
173177
context.setEndpoint(this.endpoint);
174178
context.setQueryString(this.queryString);
175179
context.setLogGroup(this.logGroup);

validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public enum PredefinedExpectedTemplate implements FileConfig {
3939
JAVA_EKS_CLIENT_CALL_METRIC("/expected-data-template/java/eks/client-call-metric.mustache"),
4040
JAVA_EKS_CLIENT_CALL_TRACE("/expected-data-template/java/eks/client-call-trace.mustache"),
4141

42+
JAVA_EKS_RDS_MYSQL_METRIC("/expected-data-template/java/eks/rds-mysql-metric.mustache"),
43+
4244
/** Java EC2 Default Test Case Validations */
4345
JAVA_EC2_DEFAULT_OUTGOING_HTTP_CALL_LOG("/expected-data-template/java/ec2/default/outgoing-http-call-log.mustache"),
4446
JAVA_EC2_DEFAULT_OUTGOING_HTTP_CALL_METRIC("/expected-data-template/java/ec2/default/outgoing-http-call-metric.mustache"),

validator/src/main/java/com/amazon/aoc/models/Context.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public class Context {
4949

5050
private String remoteServiceDeploymentName;
5151

52+
private String remoteResourceIdentifier;
53+
5254
private String endpoint;
5355

5456
private String queryString;

0 commit comments

Comments
 (0)