Skip to content

Commit 7cdbd11

Browse files
authored
test(aws-protocoltests-json-10): remove Json10WithQueryCompatibleGreetingError (#3997)
1 parent 02e47f1 commit 7cdbd11

File tree

2 files changed

+2
-47
lines changed

2 files changed

+2
-47
lines changed

codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AwsProtocolUtils.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,8 @@ private static boolean filterProtocolTests(
317317
HttpMessageTestCase testCase,
318318
TypeScriptSettings settings
319319
) {
320-
// TODO: Consume AWSQueryError trait as a follow-up in JS-2681.
321-
if (testCase.getId().equals("QueryCustomizedError")
322-
|| testCase.getId().equals("Json10WithQueryCompatibleGreetingError")) {
320+
// TODO: Consume AWSQueryError trait as a follow-up.
321+
if (testCase.getId().equals("QueryCustomizedError")) {
323322
return true;
324323
}
325324

private/aws-protocoltests-json-10/test/functional/awsjson1_0.spec.ts

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -276,50 +276,6 @@ it("AwsJson10EndpointTraitWithHostLabel:Request", async () => {
276276
}
277277
});
278278

279-
/**
280-
* @awsQueryCompatible trait is applied to service
281-
*/
282-
it.skip("Json10WithQueryCompatibleGreetingError:Error:GreetingWithErrors", async () => {
283-
const client = new JSONRPC10Client({
284-
...clientParams,
285-
requestHandler: new ResponseDeserializationTestHandler(
286-
false,
287-
402,
288-
{
289-
"x-amzn-query-error": "CustomGreetingErrorCode;Sender",
290-
"content-type": "application/x-amz-json-1.0",
291-
},
292-
`{"__type": "InvalidGreetingError","Message": "Hi"}`
293-
),
294-
});
295-
296-
const params: any = {};
297-
const command = new GreetingWithErrorsCommand(params);
298-
299-
try {
300-
await client.send(command);
301-
} catch (err) {
302-
if (err.name !== "InvalidGreeting") {
303-
console.log(err);
304-
fail(`Expected a InvalidGreeting to be thrown, got ${err.name} instead`);
305-
return;
306-
}
307-
const r: any = err;
308-
expect(r["$metadata"].httpStatusCode).toBe(402);
309-
const paramsToValidate: any = [
310-
{
311-
message: "Hi",
312-
},
313-
][0];
314-
Object.keys(paramsToValidate).forEach((param) => {
315-
expect(r[param]).toBeDefined();
316-
expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true);
317-
});
318-
return;
319-
}
320-
fail("Expected an exception to be thrown from response");
321-
});
322-
323279
/**
324280
* Parses simple JSON errors
325281
*/

0 commit comments

Comments
 (0)