Skip to content

Commit 1433d87

Browse files
adamthom-amznsrchase
authored andcommitted
Add endpoint to protocol test client generation
1 parent b823d08 commit 1433d87

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ private void generateClientRequestTest(OperationShape operation, HttpRequestTest
235235
// Create a client with a custom request handler that intercepts requests.
236236
writer.openBlock("const client = new $T({", "});\n", serviceSymbol, () -> {
237237
writer.write("...clientParams,");
238+
testCase.getHost().ifPresent(host -> {
239+
writer.write("endpoint: \"https://$L\",", host);
240+
});
238241
writer.write("requestHandler: new RequestSerializationTestHandler(),");
239242
});
240243

0 commit comments

Comments
 (0)