Skip to content

Commit 90a7f1a

Browse files
committed
Remove fixes for some now not broken request tests
The fixes were upstreamed in smithy-lang/smithy#1040, which was rolled out long ago in Smithy v1.18, 10 months ago.
1 parent 0ab5493 commit 90a7f1a

File tree

1 file changed

+2
-68
lines changed

1 file changed

+2
-68
lines changed

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

+2-68
Original file line numberDiff line numberDiff line change
@@ -1057,67 +1057,6 @@ class ServerProtocolTestGenerator(
10571057
// or because they are flaky
10581058
private val DisableTests = setOf<String>()
10591059

1060-
private fun fixRestJsonSupportsNaNFloatQueryValues(
1061-
testCase: HttpRequestTestCase,
1062-
@Suppress("UNUSED_PARAMETER")
1063-
operationShape: OperationShape,
1064-
): HttpRequestTestCase {
1065-
val params = Node.parse(
1066-
"""
1067-
{
1068-
"queryFloat": "NaN",
1069-
"queryDouble": "NaN",
1070-
"queryParamsMapOfStringList": {
1071-
"Float": ["NaN"],
1072-
"Double": ["NaN"]
1073-
}
1074-
}
1075-
""".trimIndent(),
1076-
).asObjectNode().get()
1077-
1078-
return testCase.toBuilder().params(params).build()
1079-
}
1080-
1081-
private fun fixRestJsonSupportsInfinityFloatQueryValues(
1082-
testCase: HttpRequestTestCase,
1083-
@Suppress("UNUSED_PARAMETER")
1084-
operationShape: OperationShape,
1085-
): HttpRequestTestCase =
1086-
testCase.toBuilder().params(
1087-
Node.parse(
1088-
"""
1089-
{
1090-
"queryFloat": "Infinity",
1091-
"queryDouble": "Infinity",
1092-
"queryParamsMapOfStringList": {
1093-
"Float": ["Infinity"],
1094-
"Double": ["Infinity"]
1095-
}
1096-
}
1097-
""".trimMargin(),
1098-
).asObjectNode().get(),
1099-
).build()
1100-
1101-
private fun fixRestJsonSupportsNegativeInfinityFloatQueryValues(
1102-
testCase: HttpRequestTestCase,
1103-
@Suppress("UNUSED_PARAMETER")
1104-
operationShape: OperationShape,
1105-
): HttpRequestTestCase =
1106-
testCase.toBuilder().params(
1107-
Node.parse(
1108-
"""
1109-
{
1110-
"queryFloat": "-Infinity",
1111-
"queryDouble": "-Infinity",
1112-
"queryParamsMapOfStringList": {
1113-
"Float": ["-Infinity"],
1114-
"Double": ["-Infinity"]
1115-
}
1116-
}
1117-
""".trimMargin(),
1118-
).asObjectNode().get(),
1119-
).build()
1120-
11211060
private fun fixRestJsonAllQueryStringTypes(
11221061
testCase: HttpRequestTestCase,
11231062
@Suppress("UNUSED_PARAMETER")
@@ -1226,14 +1165,9 @@ class ServerProtocolTestGenerator(
12261165
// This is because they have not been written from a server perspective, and as such the expected `params` field is incomplete.
12271166
// TODO(https://github.com/awslabs/smithy-rs/issues/1288): Contribute a PR to fix them upstream.
12281167
private val BrokenRequestTests = mapOf(
1229-
// https://github.com/awslabs/smithy/pull/1040
1230-
Pair(RestJson, "RestJsonSupportsNaNFloatQueryValues") to ::fixRestJsonSupportsNaNFloatQueryValues,
1231-
Pair(RestJson, "RestJsonSupportsInfinityFloatQueryValues") to ::fixRestJsonSupportsInfinityFloatQueryValues,
1232-
Pair(
1233-
RestJson,
1234-
"RestJsonSupportsNegativeInfinityFloatQueryValues",
1235-
) to ::fixRestJsonSupportsNegativeInfinityFloatQueryValues,
1168+
// TODO(https://github.com/awslabs/smithy/pull/1564)
12361169
Pair(RestJson, "RestJsonAllQueryStringTypes") to ::fixRestJsonAllQueryStringTypes,
1170+
// TODO(https://github.com/awslabs/smithy/pull/1562)
12371171
Pair(RestJson, "RestJsonQueryStringEscaping") to ::fixRestJsonQueryStringEscaping,
12381172

12391173
// https://github.com/awslabs/smithy/pull/1392

0 commit comments

Comments
 (0)