Skip to content

Commit 46307a1

Browse files
authored
Add validation templates for Go SDK (#175)
1 parent a1d74b5 commit 46307a1

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ public enum ExpectedTrace implements FileConfig {
3030
SPRINGBOOT_SDK_HTTP_EXPECTED_TRACE(
3131
"/expected-data-template/springboot/springbootAppExpectedHTTPTrace.mustache"),
3232
SPRINGBOOT_SDK_AWSSDK_EXPECTED_TRACE(
33-
"/expected-data-template/springboot/springbootAppExpectedAWSSDKTrace.mustache")
33+
"/expected-data-template/springboot/springbootAppExpectedAWSSDKTrace.mustache"),
34+
GO_SDK_HTTP_EXPECTED_TRACE(
35+
"/expected-data-template/go/goAppExpectedHTTPTrace.mustache"
36+
),
37+
GO_SDK_AWSSDK_EXPECTED_TRACE(
38+
"/expected-data-template/go/goAppExpectedAWSSDKTrace.mustache"
39+
)
3440
;
3541

3642
private String path;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[{
2+
"http": {
3+
"request": {
4+
"url": "{{endpoint}}/aws-sdk-call",
5+
"method": "GET"
6+
},
7+
"response": {
8+
"status": 200
9+
}
10+
}
11+
}]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[{
2+
"http": {
3+
"request": {
4+
"url": "{{endpoint}}/outgoing-http-call",
5+
"method": "GET"
6+
},
7+
"response": {
8+
"status": 200
9+
}
10+
},
11+
"subsegments": [
12+
{
13+
"name": "aws.amazon.com",
14+
"http": {
15+
"request": {
16+
"url": "https://aws.amazon.com",
17+
"method": "GET"
18+
}
19+
},
20+
"namespace": "remote"
21+
}
22+
]
23+
}]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-
2+
validationType: "trace"
3+
httpPath: "/outgoing-http-call"
4+
httpMethod: "get"
5+
callingType: "http"
6+
expectedTraceTemplate: "GO_SDK_HTTP_EXPECTED_TRACE"
7+
-
8+
validationType: "trace"
9+
httpPath: "/aws-sdk-call"
10+
httpMethod: "get"
11+
callingType: "http"
12+
expectedTraceTemplate: "GO_SDK_AWSSDK_EXPECTED_TRACE"

0 commit comments

Comments
 (0)