Skip to content

Commit

Permalink
Update int tests with new header
Browse files Browse the repository at this point in the history
Signed-off-by: Renuka Fernando <[email protected]>
  • Loading branch information
renuka-fernando committed Apr 18, 2024
1 parent 63d93b4 commit 4c58759
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void checkHeadersSentToBackend() throws Exception {

// Request headers received by the backend
JSONObject headersSentToBackend = new JSONObject(response.getData());
Assert.assertEquals(headersSentToBackend.length(), 8, "Unexpected number of headers received by the backend");
Assert.assertEquals(headersSentToBackend.length(), 9, "Unexpected number of headers received by the backend");

JSONObject headersToBackend = Utils.changeHeadersToLowerCase(headersSentToBackend);

Expand All @@ -63,6 +63,7 @@ public void checkHeadersSentToBackend() throws Exception {
Assert.assertNotNull(headersToBackend.get("pragma"));
Assert.assertNotNull(headersToBackend.get("user-agent"));
Assert.assertNotNull(headersToBackend.get("cache-control"));
Assert.assertNotNull(headersToBackend.get("x-choreo-api-id"));

Assert.assertFalse(headersToBackend.has("x-envoy-original-path"), "x-envoy-original-path not removed");
Assert.assertFalse(headersToBackend.has("x-wso2-cluster-header"), "x-wso2-cluster-header not removed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void checkHeadersSentToBackend() throws Exception {

// Request headers received by the backend
JSONObject headersSentToBackend = new JSONObject(response.getData());
Assert.assertEquals(headersSentToBackend.length(), 9, "Unexpected number of headers received by the backend");
Assert.assertEquals(headersSentToBackend.length(), 10, "Unexpected number of headers received by the backend");

JSONObject headersToBackend = Utils.changeHeadersToLowerCase(headersSentToBackend);

Expand All @@ -74,6 +74,7 @@ public void checkHeadersSentToBackend() throws Exception {
Assert.assertNotNull(headersToBackend.get("pragma"));
Assert.assertNotNull(headersToBackend.get("user-agent"));
Assert.assertNotNull(headersToBackend.get("cache-control"));
Assert.assertNotNull(headersToBackend.get("x-choreo-api-id"));

Assert.assertFalse(headersToBackend.has("x-envoy-original-path"), "x-envoy-original-path not removed");
Assert.assertFalse(headersToBackend.has("x-wso2-cluster-header"), "x-wso2-cluster-header not removed");
Expand Down

0 comments on commit 4c58759

Please sign in to comment.