|
17 | 17 |
|
18 | 18 | import java.util.Set;
|
19 | 19 | import java.util.TreeSet;
|
| 20 | + |
| 21 | +import software.amazon.smithy.aws.go.codegen.customization.AwsCustomGoDependency; |
20 | 22 | import software.amazon.smithy.codegen.core.Symbol;
|
21 | 23 | import software.amazon.smithy.go.codegen.GoWriter;
|
22 | 24 | import software.amazon.smithy.go.codegen.SmithyGoDependency;
|
@@ -98,96 +100,12 @@ static void generateHttpProtocolTests(GenerationContext context) {
|
98 | 100 | inputConfigValues.add(HttpProtocolUnitTestGenerator.ConfigValue.builder()
|
99 | 101 | .name(AddAwsConfigFields.HTTP_CLIENT_CONFIG_NAME)
|
100 | 102 | .value(writer -> {
|
101 |
| - writer.addUseImports(AwsGoDependency.AWS_HTTP_TRANSPORT); |
102 |
| - writer.write("awshttp.NewBuildableClient(),"); |
| 103 | + writer.addUseImports(AwsGoDependency.AWS_PROTOCOL_TEST_HTTP_CLIENT); |
| 104 | + writer.write("protocoltesthttp.NewClient(),"); |
103 | 105 | })
|
104 | 106 | .build());
|
105 | 107 |
|
106 |
| - Set<HttpProtocolUnitTestGenerator.SkipTest> inputSkipTests = new TreeSet<>(SetUtils.of( |
107 |
| - // Endpoint prefix serialization doesn't work with test runner's handling of request URLs. |
108 |
| - // e.g. http://foo.127.0.0.1:59850/ dial fail |
109 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
110 |
| - .service(ShapeId.from("aws.protocoltests.restjson#RestJson")) |
111 |
| - .operation(ShapeId.from("aws.protocoltests.restjson#EndpointOperation")) |
112 |
| - .addTestName("RestJsonEndpointTrait") |
113 |
| - .build(), |
114 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
115 |
| - .service(ShapeId.from("aws.protocoltests.restjson#RestJson")) |
116 |
| - .operation(ShapeId.from("aws.protocoltests.restjson#EndpointWithHostLabelOperation")) |
117 |
| - .addTestName("RestJsonEndpointTraitWithHostLabel") |
118 |
| - .build(), |
119 |
| - |
120 |
| - // Endpoint prefix serialization doesn't work with test runner's handling of request URLs. |
121 |
| - // e.g. http://foo.127.0.0.1:59850/ dial fail |
122 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
123 |
| - .service(ShapeId.from("aws.protocoltests.ec2#AwsEc2")) |
124 |
| - .operation(ShapeId.from("aws.protocoltests.ec2#EndpointOperation")) |
125 |
| - .addTestName("Ec2QueryEndpointTrait") |
126 |
| - .build(), |
127 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
128 |
| - .service(ShapeId.from("aws.protocoltests.ec2#AwsEc2")) |
129 |
| - .operation(ShapeId.from("aws.protocoltests.ec2#EndpointWithHostLabelOperation")) |
130 |
| - .addTestName("Ec2QueryEndpointTraitWithHostLabel") |
131 |
| - .build(), |
132 |
| - |
133 |
| - // Endpoint prefix serialization doesn't work with test runner's handling of request URLs. |
134 |
| - // e.g. http://foo.127.0.0.1:59850/ dial fail |
135 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
136 |
| - .service(ShapeId.from("aws.protocoltests.json#JsonProtocol")) |
137 |
| - .operation(ShapeId.from("aws.protocoltests.json#EndpointOperation")) |
138 |
| - .addTestName("AwsJson11EndpointTrait") |
139 |
| - .build(), |
140 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
141 |
| - .service(ShapeId.from("aws.protocoltests.json#JsonProtocol")) |
142 |
| - .operation(ShapeId.from("aws.protocoltests.json#EndpointWithHostLabelOperation")) |
143 |
| - .addTestName("AwsJson11EndpointTraitWithHostLabel") |
144 |
| - .build(), |
145 |
| - |
146 |
| - // Endpoint prefix serialization doesn't work with test runner's handling of request URLs. |
147 |
| - // e.g. http://foo.127.0.0.1:59850/ dial fail |
148 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
149 |
| - .service(ShapeId.from("aws.protocoltests.json10#JsonRpc10")) |
150 |
| - .operation(ShapeId.from("aws.protocoltests.json10#EndpointOperation")) |
151 |
| - .addTestName("AwsJson10EndpointTrait") |
152 |
| - .build(), |
153 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
154 |
| - .service(ShapeId.from("aws.protocoltests.json10#JsonRpc10")) |
155 |
| - .operation(ShapeId.from("aws.protocoltests.json10#EndpointWithHostLabelOperation")) |
156 |
| - .addTestName("AwsJson10EndpointTraitWithHostLabel") |
157 |
| - .build(), |
158 |
| - |
159 |
| - // Endpoint prefix serialization doesn't work with test runner's handling of request URLs. |
160 |
| - // e.g. http://foo.127.0.0.1:59850/ dial fail |
161 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
162 |
| - .service(ShapeId.from("aws.protocoltests.query#AwsQuery")) |
163 |
| - .operation(ShapeId.from("aws.protocoltests.query#EndpointOperation")) |
164 |
| - .addTestName("AwsQueryEndpointTrait") |
165 |
| - .build(), |
166 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
167 |
| - .service(ShapeId.from("aws.protocoltests.query#AwsQuery")) |
168 |
| - .operation(ShapeId.from("aws.protocoltests.query#EndpointWithHostLabelOperation")) |
169 |
| - .addTestName("AwsQueryEndpointTraitWithHostLabel") |
170 |
| - .build(), |
171 |
| - |
172 |
| - // Endpoint prefix serialization doesn't work with test runner's handling of request URLs. |
173 |
| - // e.g. http://foo.127.0.0.1:59850/ dial fail |
174 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
175 |
| - .service(ShapeId.from("aws.protocoltests.restxml#RestXml")) |
176 |
| - .operation(ShapeId.from("aws.protocoltests.restxml#EndpointOperation")) |
177 |
| - .addTestName("RestXmlEndpointTrait") |
178 |
| - .build(), |
179 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
180 |
| - .service(ShapeId.from("aws.protocoltests.restxml#RestXml")) |
181 |
| - .operation(ShapeId.from("aws.protocoltests.restxml#EndpointWithHostLabelHeaderOperation")) |
182 |
| - .addTestName("RestXmlEndpointTraitWithHostLabelAndHttpBinding") |
183 |
| - .build(), |
184 |
| - HttpProtocolUnitTestGenerator.SkipTest.builder() |
185 |
| - .service(ShapeId.from("aws.protocoltests.restxml#RestXml")) |
186 |
| - .operation(ShapeId.from("aws.protocoltests.restxml#EndpointWithHostLabelOperation")) |
187 |
| - .addTestName("RestXmlEndpointTraitWithHostLabel") |
188 |
| - .build() |
189 |
| - |
190 |
| - )); |
| 108 | + Set<HttpProtocolUnitTestGenerator.SkipTest> inputSkipTests = new TreeSet<>(SetUtils.of()); |
191 | 109 |
|
192 | 110 | Set<HttpProtocolUnitTestGenerator.SkipTest> outputSkipTests = new TreeSet<>(SetUtils.of(
|
193 | 111 | // REST-JSON optional (SHOULD) test cases
|
|
0 commit comments