Skip to content

Commit

Permalink
Merge pull request #68 from disneystreaming/add-awstest-config
Browse files Browse the repository at this point in the history
update Smithy model to latest version and update aws test configs
  • Loading branch information
yisraelU authored Feb 28, 2023
2 parents b7b2fb0 + d09ef18 commit 26903dc
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 54 deletions.
2 changes: 1 addition & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ object `protocol-tests` extends BaseJavaModule {

object Deps {
val smithy = new {
val smithyVersion = "1.27.2"
val smithyVersion = "1.28.0"
val model = ivy"software.amazon.smithy:smithy-model:$smithyVersion"
val awsTraits = ivy"software.amazon.smithy:smithy-aws-traits:$smithyVersion"
val awsProtocolTestTraits =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,19 @@ object ExampleNode {
example: Example,
memberName: String
): ExampleNode =
ExampleNode(example, example.getOutput.getMember(memberName).asScala)
ExampleNode(
example,
example.getOutput.asScala.flatMap(_.getMember(memberName).asScala)
)

private[protocols] def forOutputMembers(
example: Example,
memberNames: List[String]
): ExampleNode = {
val members: List[(String, Node)] = memberNames.flatMap(name =>
example.getOutput.getMember(name).asScala.map(name -> _)
example.getOutput.asScala.flatMap(
_.getMember(name).asScala.map(name -> _)
)
)
ExampleNode(example, members)
}
Expand Down
138 changes: 87 additions & 51 deletions modules/protocol-tests/resources/META-INF/smithy/test-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,21 +325,11 @@
"appliesTo": "client",
"description": "request"
},
{
"id": "RestJsonJsonBlobs",
"appliesTo": "client",
"description": "request"
},
{
"id": "DocumentInputWithString",
"appliesTo": "client",
"description": "request"
},
{
"id": "RestJsonJsonBlobs",
"appliesTo": "client",
"description": "response"
},
{
"id": "DocumentInputWithNumber",
"appliesTo": "client",
Expand Down Expand Up @@ -515,11 +505,6 @@
"appliesTo": "client",
"description": "request"
},
{
"id": "RestJsonHttpWithHeadersButNoPayload",
"appliesTo": "client",
"description": "request"
},
{
"id": "RestJsonTestBodyStructure",
"appliesTo": "client",
Expand All @@ -535,11 +520,6 @@
"appliesTo": "client",
"description": "request"
},
{
"id": "RestJsonHttpWithEmptyStructurePayload",
"appliesTo": "client",
"description": "request"
},
{
"id": "RestJsonHttpWithEmptyBody",
"appliesTo": "client",
Expand Down Expand Up @@ -735,11 +715,6 @@
"appliesTo": "server",
"description": "response"
},
{
"id": "RestJsonHttpPrefixHeadersAreNotPresent",
"appliesTo": "server",
"description": "request"
},
{
"id": "RestJsonHttpPrefixHeadersArePresent",
"appliesTo": "server",
Expand Down Expand Up @@ -900,11 +875,6 @@
"appliesTo": "server",
"description": "request"
},
{
"id": "RestJsonJsonBlobs",
"appliesTo": "server",
"description": "response"
},
{
"id": "RestJsonJsonMaps",
"appliesTo": "server",
Expand Down Expand Up @@ -965,11 +935,6 @@
"appliesTo": "server",
"description": "request"
},
{
"id": "RestJsonJsonBlobs",
"appliesTo": "server",
"description": "request"
},
{
"id": "DocumentTypeInputWithObject",
"appliesTo": "server",
Expand Down Expand Up @@ -1130,21 +1095,11 @@
"appliesTo": "server",
"description": "request"
},
{
"id": "RestJsonHttpWithHeadersButNoPayload",
"appliesTo": "server",
"description": "request"
},
{
"id": "RestJsonTestPayloadStructure",
"appliesTo": "server",
"description": "request"
},
{
"id": "RestJsonHttpWithEmptyStructurePayload",
"appliesTo": "server",
"description": "request"
},
{
"id": "RestJsonHttpWithEmptyBody",
"appliesTo": "server",
Expand Down Expand Up @@ -1216,30 +1171,111 @@
"description": "request"
},
{
"id": "RestJsonHttpPrefixHeadersAreNotPresent",
"id": "RestJsonHttpChecksumRequired",
"appliesTo": "server",
"description": "request"
},
{
"id": "RestJsonHttpChecksumRequired",
"id": "RestJsonSerializeRenamedStructureUnionValue",
"appliesTo": "server",
"description": "request"
},
{
"id": "RestJsonSerializeRenamedStructureUnionValue",
"id": "RestJsonStreamingTraitsWithNoBlobBody",
"appliesTo": "server",
"description": "response"
},
{
"id": "RestJsonSerializeBlobUnionValue",
"appliesTo": "client",
"description": "request"
},
{
"id": "RestJsonStreamingTraitsWithNoBlobBody",
"id": "JsonUnions",
"appliesTo": "client",
"description": "request"
},
{
"id": "JsonUnions",
"appliesTo": "client",
"description": "response"
},
{
"id": "RestJsonGreetingWithErrors",
"appliesTo": "server",
"description": "response"
},
{
"id": "RestJsonStreamingTraitsWithNoBlobBody",
"id": "RestJsonSerializeTimestampUnionValue",
"appliesTo": "server",
"description": "request"
},
{
"id": "RestJsonDeserializeBlobUnionValue",
"appliesTo": "server",
"description": "response"
},
{
"id": "RestJsonDeserializeTimestampUnionValue",
"appliesTo": "server",
"description": "response"
},
{
"id": "RestJsonJsonTimestamps",
"appliesTo": "server",
"description": "response"
},
{
"id": "RestJsonJsonTimestamps",
"appliesTo": "server",
"description": "request"
},
{
"id": "RestJsonDeserializeTimestampUnionValue",
"appliesTo": "client",
"description": "request"
},
{
"id": "RestJsonDeserializeTimestampUnionValue",
"appliesTo": "client",
"description": "response"
},
{
"id": "RestJsonJsonTimestamps",
"appliesTo": "client",
"description": "request"
},
{
"id": "RestJsonJsonTimestamps",
"appliesTo": "client",
"description": "response"
},
{
"id": "StringPayloadRequest",
"appliesTo": "client",
"description": "request"
},
{
"id": "EnumPayloadRequest",
"appliesTo": "client",
"description": "request"
},
{
"id": "RestJsonSerializeTimestampUnionValue",
"appliesTo": "client",
"description": "request"
},
{
"id": "RestJsonDateTimeWithFractionalSeconds",
"appliesTo": "client",
"description": "response"
},
{
"id": "RestJsonHttpDateWithFractionalSeconds",
"appliesTo": "client",
"description": "response"
}
]
}
}
}

0 comments on commit 26903dc

Please sign in to comment.