Skip to content

Commit

Permalink
fix: validate resolvedHost from httpRequestTests
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Jun 5, 2024
1 parent de18afd commit 1d6f814
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ it("MachinelearningPredictEndpoint:Request", async () => {
expect(r.headers["content-type"]).toBeDefined();
expect(r.headers["content-type"]).toBe("application/x-amz-json-1.1");

expect(r.headers["host"]).toBeDefined();
expect(r.headers["host"]).toBe("custom.example.com");

expect(r.body).toBeDefined();
const utf8Encoder = client.config.utf8Encoder;
const bodyString = `{\"MLModelId\": \"foo\", \"Record\": {}, \"PredictEndpoint\": \"https://custom.example.com/\"}`;
Expand Down

0 comments on commit 1d6f814

Please sign in to comment.