Skip to content

Commit

Permalink
Merge fixes for patch release 1.5.1 (aws#364)
Browse files Browse the repository at this point in the history
* fix: Adding pathParameters to v2 proxy event as reported in aws#358.

* fix: Address JSON content type issue reported in aws#352 and aws#344

* fix: Fixed bug caught by integration tests for aws#352

* fix: Fix struts tests for the changes made for aws#352

* test: Attempting to replicate the issue reported in aws#342

* test: Reverting exception test in Spring package since it's only available in Spring5, not Spring4

* fix: Sigh, forgot to remove the import for the class that doesn't exist from the previous commit

* fix: Addresses bug reported in query string parsing (aws#363) for HTTP API support where we have a query string key, followed by a value declarator (=), but then no value

* chore: Update GitHub issue and PR templates

* fix: Fixed issue reported by SpotBugs with the exception logging of the HTTP API query string parsing
  • Loading branch information
sapessi authored and jogep committed Dec 8, 2020
1 parent c1e0607 commit 24e4f8d
Showing 1 changed file with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
import java.util.Collection;
import java.util.stream.Collectors;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

@RunWith(Parameterized.class)
public class ServletAppTest {
Expand Down Expand Up @@ -191,18 +192,4 @@ public void springExceptionMapping_throw404Ex_expectMappedTo404() {
assertNotNull(resp);
assertEquals(404, resp.getStatusCode());
}

@Test
public void echoMessage_populatesSingleValueHeadersForHttpApiV2() {
AwsProxyRequestBuilder req = new AwsProxyRequestBuilder("/message", "POST")
.header(HttpHeaders.CONTENT_TYPE, "application/json;v=1")
.header(HttpHeaders.ACCEPT, "application/json;v=1")
.body(new MessageData("test message"));
AwsProxyResponse resp = handler.handleRequest(req, lambdaContext);
if ("HTTP_API".equals(type)) {
assertNotNull(resp.getHeaders());
} else {
assertNull(resp.getHeaders());
}
}
}

0 comments on commit 24e4f8d

Please sign in to comment.