Skip to content

Commit

Permalink
Skip unsupported Smithy protocol tests (#1168)
Browse files Browse the repository at this point in the history
Skips the Smithy protocol tests that the V2 SDK's codegen protocol testing do not yet support.
  • Loading branch information
jasdel authored Mar 12, 2021
1 parent 5448b45 commit 76f2f55
Show file tree
Hide file tree
Showing 73 changed files with 7,334 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,89 @@ static void generateHttpProtocolTests(GenerationContext context) {
.build());

Set<HttpProtocolUnitTestGenerator.SkipTest> inputSkipTests = new TreeSet<>(SetUtils.of(
// Smithy 1.6 changed unit tests that the SDK codegen don't support or are opinionated.
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.restjson#RestJson"))
.operation(ShapeId.from("aws.protocoltests.restjson#EmptyInputAndEmptyOutput"))
.addTestName("RestJsonEmptyInputAndEmptyOutputWithJson")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.restjson#RestJson"))
.operation(ShapeId.from("aws.protocoltests.restjson#EndpointOperation"))
.addTestName("RestJsonEndpointTrait")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.restjson#RestJson"))
.operation(ShapeId.from("aws.protocoltests.restjson#EndpointWithHostLabelOperation"))
.addTestName("RestJsonEndpointTraitWithHostLabel")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.ec2#AwsEc2"))
.operation(ShapeId.from("aws.protocoltests.ec2#EndpointOperation"))
.addTestName("Ec2QueryEndpointTrait")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.ec2#AwsEc2"))
.operation(ShapeId.from("aws.protocoltests.ec2#EndpointWithHostLabelOperation"))
.addTestName("Ec2QueryEndpointTraitWithHostLabel")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.json#JsonProtocol"))
.operation(ShapeId.from("aws.protocoltests.json#EmptyOperation"))
.addTestName("json_1_1_service_supports_empty_payload_for_no_input_shape")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.json#JsonProtocol"))
.operation(ShapeId.from("aws.protocoltests.json#EndpointOperation"))
.addTestName("AwsJson11EndpointTrait")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.json#JsonProtocol"))
.operation(ShapeId.from("aws.protocoltests.json#EndpointWithHostLabelOperation"))
.addTestName("AwsJson11EndpointTraitWithHostLabel")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.json10#JsonRpc10"))
.operation(ShapeId.from("aws.protocoltests.json10#NoInputAndNoOutput"))
.addTestName("AwsJson10ServiceSupportsNoPayloadForNoInput")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.json10#JsonRpc10"))
.operation(ShapeId.from("aws.protocoltests.json10#EndpointOperation"))
.addTestName("AwsJson10EndpointTrait")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.json10#JsonRpc10"))
.operation(ShapeId.from("aws.protocoltests.json10#EndpointWithHostLabelOperation"))
.addTestName("AwsJson10EndpointTraitWithHostLabel")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.query#AwsQuery"))
.operation(ShapeId.from("aws.protocoltests.query#EndpointOperation"))
.addTestName("AwsQueryEndpointTrait")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.query#AwsQuery"))
.operation(ShapeId.from("aws.protocoltests.query#EndpointWithHostLabelOperation"))
.addTestName("AwsQueryEndpointTraitWithHostLabel")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.restxml#RestXml"))
.operation(ShapeId.from("aws.protocoltests.restxml#EndpointOperation"))
.addTestName("RestXmlEndpointTrait")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.restxml#RestXml"))
.operation(ShapeId.from("aws.protocoltests.restxml#EndpointWithHostLabelHeaderOperation"))
.addTestName("RestXmlEndpointTraitWithHostLabelAndHttpBinding")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.restxml#RestXml"))
.operation(ShapeId.from("aws.protocoltests.restxml#EndpointWithHostLabelOperation"))
.addTestName("RestXmlEndpointTraitWithHostLabel")
.build(),


// REST-JSON Documents
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.restjson#RestJson"))
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

126 changes: 126 additions & 0 deletions internal/protocoltest/awsrestjson/api_op_EndpointOperation.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 76f2f55

Please sign in to comment.