Skip to content

Commit 33ec9ea

Browse files
committed
Protocol test project updates
1 parent f25543e commit 33ec9ea

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

generator/ProtocolTestsGenerator/settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pluginManagement {
1212
dependencyResolutionManagement {
1313
versionCatalogs {
1414
create("codegen") {
15-
version("smithy", "1.54.0")
15+
version("smithy", "1.60.3")
1616
library("protocol-tests", "software.amazon.smithy", "smithy-aws-protocol-tests").versionRef("smithy")
1717
library("codegen-core", "software.amazon.smithy", "smithy-codegen-core").versionRef("smithy")
1818
library("protocol-tests-traits", "software.amazon.smithy", "smithy-protocol-test-traits").versionRef("smithy")

generator/ProtocolTestsGenerator/smithy-dotnet-codegen/src/main/java/software/amazon/smithy/dotnet/codegen/HttpProtocolTestGenerator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ private void generateErrorResponseTests(OperationShape operation, OperationIndex
9494
for (StructureShape error : index.getErrors(operation, service)) {
9595
error.getTrait(HttpResponseTestsTrait.class).ifPresent(trait -> {
9696
for (HttpResponseTestCase httpResponseTestCase : trait.getTestCasesFor(AppliesTo.CLIENT)) {
97-
generateErrorResponseTest(operation, error, httpResponseTestCase);
97+
if (!ProtocolTestCustomizations.TestsToSkip.contains(httpResponseTestCase.getId())){
98+
generateErrorResponseTest(operation, error, httpResponseTestCase);
99+
}
98100
}
99101
});
100102
}

generator/ProtocolTestsGenerator/smithy-dotnet-codegen/src/main/java/software/amazon/smithy/dotnet/codegen/customizations/ProtocolTestCustomizations.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,12 @@ private ProtocolTestCustomizations() {
9696
// to use exceptions and control flow.
9797
"QueryEmptyInputAndEmptyOutput",
9898
"QueryNoInputAndNoOutput",
99-
"QueryNoInputAndOutput"
99+
"QueryNoInputAndOutput",
100+
// this test is skipped because in the C2J Ruby added a hook which adds the "code" json key which can NEVER exist in a
101+
// non-query protocol. this causes our code generation to check on this code instead of what is modeled and our protocol
102+
// test passes. As this can never happen in a real service, we can skip this to avoid unnecessary customizations in the generator
103+
// for a scenario that will never happen.
104+
"QueryCompatibleAwsJson10CustomCodeError"
100105
);
101106
public static final List<String> VNextTests = Arrays.asList(
102107
//These are the tests that are failing in v4 after updating to 1.54.0 and artifacts 1.0.3004.0. Each one needs to be investigated.

generator/ProtocolTestsGenerator/smithy-dotnet-protocol-test/smithy-build.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,24 @@
127127
"packageVersion": "0.0.1"
128128
}
129129
}
130+
},
131+
"QueryCompatibleJSONRPC10": {
132+
"transforms": [
133+
{
134+
"name": "includeServices",
135+
"args": {
136+
"services": [
137+
"aws.protocoltests.json10#QueryCompatibleJsonRpc10"
138+
]
139+
}
140+
}
141+
],
142+
"plugins": {
143+
"dotnet-protocol-test-codegen": {
144+
"service": "aws.protocoltests.json10#QueryCompatibleJsonRpc10",
145+
"packageVersion": "0.0.1"
146+
}
147+
}
130148
}
131149
}
132150
}

0 commit comments

Comments
 (0)