Skip to content

Commit c5c87be

Browse files
jjantdavid-perez
andauthored
Add links to relevant issues/PRs for failing protocol tests (#1895)
* Add links to relevant issues/PRs for failing tests * Update codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt Co-authored-by: david-perez <d@vidp.dev> * Format comment better * Remove `RestJsonStreamingTraitsRequireLengthWithBlob` from failing tests This test actually passes fine, but is not relevant for the server. * Add comment about `RestJsonHttpResponseCodeDefaultsToModeledCode` Co-authored-by: david-perez <d@vidp.dev>
1 parent 87e1ed0 commit c5c87be

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -872,31 +872,46 @@ class ServerProtocolTestGenerator(
872872
private val AwsQuery = "aws.protocoltests.query#AwsQuery"
873873
private val Ec2Query = "aws.protocoltests.ec2#AwsEc2"
874874
private val ExpectFail = setOf<FailingTest>(
875-
// Headers.
875+
// Pending resolution from the Smithy team, see https://github.com/awslabs/smithy/issues/1068.
876876
FailingTest(RestJson, "RestJsonHttpWithHeadersButNoPayload", TestType.Request),
877877

878-
FailingTest(RestJson, "RestJsonEndpointTrait", TestType.Request),
879-
FailingTest(RestJson, "RestJsonEndpointTraitWithHostLabel", TestType.Request),
880-
FailingTest(RestJson, "RestJsonStreamingTraitsRequireLengthWithBlob", TestType.Response),
881878
FailingTest(RestJson, "RestJsonHttpWithEmptyBlobPayload", TestType.Request),
882879
FailingTest(RestJson, "RestJsonHttpWithEmptyStructurePayload", TestType.Request),
880+
881+
// See https://github.com/awslabs/smithy/issues/1098 for context.
883882
FailingTest(RestJson, "RestJsonHttpResponseCodeDefaultsToModeledCode", TestType.Response),
884883

884+
// Endpoint trait is not implemented yet, see https://github.com/awslabs/smithy-rs/issues/950.
885+
FailingTest(RestJson, "RestJsonEndpointTrait", TestType.Request),
886+
FailingTest(RestJson, "RestJsonEndpointTraitWithHostLabel", TestType.Request),
887+
888+
// Work in progress PR, see https://github.com/awslabs/smithy-rs/pull/1294.
885889
FailingTest(RestJson, "RestJsonBodyMalformedBlobInvalidBase64_case1", TestType.MalformedRequest),
886890
FailingTest(RestJson, "RestJsonBodyMalformedBlobInvalidBase64_case2", TestType.MalformedRequest),
887-
FailingTest(RestJson, "RestJsonWithBodyExpectsApplicationJsonContentType", TestType.MalformedRequest),
888-
FailingTest(RestJson, "RestJsonBodyMalformedListNullItem", TestType.MalformedRequest),
889-
FailingTest(RestJson, "RestJsonBodyMalformedMapNullValue", TestType.MalformedRequest),
890-
FailingTest(RestJson, "RestJsonMalformedSetDuplicateItems", TestType.MalformedRequest),
891-
FailingTest(RestJson, "RestJsonMalformedSetNullItem", TestType.MalformedRequest),
892891
FailingTest(
893892
RestJson,
894893
"RestJsonHeaderMalformedStringInvalidBase64MediaType_case1",
895894
TestType.MalformedRequest,
896895
),
897-
FailingTest(RestJson, "RestJsonMalformedUnionNoFieldsSet", TestType.MalformedRequest),
896+
897+
FailingTest(RestJson, "RestJsonWithBodyExpectsApplicationJsonContentType", TestType.MalformedRequest),
898+
FailingTest(RestJson, "RestJsonBodyMalformedListNullItem", TestType.MalformedRequest),
899+
FailingTest(RestJson, "RestJsonBodyMalformedMapNullValue", TestType.MalformedRequest),
900+
901+
// Deprioritized, sets don't exist in Smithy 2.0.
902+
// They have the exact same semantics as list shapes with `@uniqueItems`,
903+
// so we could implement them as such once we've added support for constraint traits.
904+
//
905+
// See https://github.com/awslabs/smithy/issues/1266#issuecomment-1169543051.
906+
// See https://awslabs.github.io/smithy/2.0/guides/migrating-idl-1-to-2.html#convert-set-shapes-to-list-shapes.
907+
FailingTest(RestJson, "RestJsonMalformedSetDuplicateItems", TestType.MalformedRequest),
908+
FailingTest(RestJson, "RestJsonMalformedSetNullItem", TestType.MalformedRequest),
898909
FailingTest(RestJson, "RestJsonMalformedSetDuplicateBlobs", TestType.MalformedRequest),
899910

911+
FailingTest(RestJson, "RestJsonMalformedUnionNoFieldsSet", TestType.MalformedRequest),
912+
913+
// Tests involving constraint traits, which are not yet implemented.
914+
// See https://github.com/awslabs/smithy-rs/pull/1342.
900915
FailingTest(RestJsonValidation, "RestJsonMalformedEnumList_case0", TestType.MalformedRequest),
901916
FailingTest(RestJsonValidation, "RestJsonMalformedEnumList_case1", TestType.MalformedRequest),
902917
FailingTest(RestJsonValidation, "RestJsonMalformedEnumMapKey_case0", TestType.MalformedRequest),

0 commit comments

Comments
 (0)