Skip to content

Commit c37b8eb

Browse files
Add error code assertions to exisitng query tests
1 parent 420aa53 commit c37b8eb

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

smithy-aws-protocol-tests/model/awsQuery/xml-errors.smithy

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ namespace aws.protocoltests.query
2929

3030
use aws.protocols#awsQueryError
3131
use aws.protocols#awsQuery
32+
use aws.protocoltests.config#ErrorCodeParams
3233
use smithy.test#httpResponseTests
3334

3435
/// This operation has three possible return values:
@@ -97,6 +98,11 @@ apply InvalidGreeting @httpResponseTests([
9798
</ErrorResponse>
9899
""",
99100
bodyMediaType: "application/xml",
101+
vendorParamsShape: ErrorCodeParams
102+
vendorParams: {
103+
code: "InvalidGreeting"
104+
type: "Sender"
105+
}
100106
}
101107
])
102108

@@ -136,6 +142,11 @@ apply ComplexError @httpResponseTests([
136142
</ErrorResponse>
137143
""",
138144
bodyMediaType: "application/xml",
145+
vendorParamsShape: ErrorCodeParams
146+
vendorParams: {
147+
code: "ComplexError"
148+
type: "Sender"
149+
}
139150
}
140151
])
141152

@@ -175,5 +186,10 @@ apply CustomCodeError @httpResponseTests([
175186
</ErrorResponse>
176187
""",
177188
bodyMediaType: "application/xml",
189+
vendorParamsShape: ErrorCodeParams
190+
vendorParams: {
191+
code: "Customized"
192+
type: "Sender"
193+
}
178194
}
179195
])

smithy-aws-protocol-tests/model/ec2Query/xml-errors.smithy

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ $version: "2.0"
2323
namespace aws.protocoltests.ec2
2424

2525
use aws.protocols#ec2Query
26+
use aws.protocoltests.config#ErrorCodeParams
2627
use smithy.test#httpResponseTests
2728

2829
/// This operation has three possible return values:
@@ -91,6 +92,10 @@ apply InvalidGreeting @httpResponseTests([
9192
params: {
9293
Message: "Hi"
9394
},
95+
vendorParamsShape: ErrorCodeParams
96+
vendorParams: {
97+
code: "InvalidGreeting"
98+
}
9499
}
95100
])
96101

@@ -132,6 +137,10 @@ apply ComplexError @httpResponseTests([
132137
</Response>
133138
""",
134139
bodyMediaType: "application/xml",
140+
vendorParamsShape: ErrorCodeParams
141+
vendorParams: {
142+
code: "ComplexError"
143+
}
135144
}
136145
])
137146

0 commit comments

Comments
 (0)