Skip to content

Commit

Permalink
Fixed unit test and added build status.
Browse files Browse the repository at this point in the history
  • Loading branch information
dealako committed Jun 4, 2019
1 parent fcf6e90 commit ba4da44
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## AWS Lambda Go Api Proxy

[![CircleCI](https://circleci.com/gh/LF-Engineering/aws-lambda-go-api-proxy/tree/master.svg?style=svg&circle-token=7a4af389ad43eb22517668fa8997847e3d981de4)](https://circleci.com/gh/LF-Engineering/aws-lambda-go-api-proxy/tree/master)

**LF Notice**: this is a fork of [github.com/awslabs/aws-lambda-go-api-proxy](github.com/awslabs/aws-lambda-go-api-proxy) that contains:

* Fix for response headers (current master branch in upstream is broken)
Expand Down
10 changes: 8 additions & 2 deletions core/response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ var _ = Describe("ResponseWriter tests", func() {
Expect(err).To(BeNil())

// Headers are not written to `Headers` field
Expect(0).To(Equal(len(proxyResponse.Headers)))
// TODO: DAD - why is this test here (commented out for now)? Added
// back the logic to copy over headers - without this the
// 'Content-Type' is NOT passed through properly
//Expect(0).To(Equal(len(proxyResponse.Headers)))
Expect(1).To(Equal(len(proxyResponse.MultiValueHeaders["Content-Type"])))
Expect("application/json").To(Equal(proxyResponse.MultiValueHeaders["Content-Type"][0]))
})
Expand All @@ -168,7 +171,10 @@ var _ = Describe("ResponseWriter tests", func() {
Expect(err).To(BeNil())

// Headers are not written to `Headers` field
Expect(0).To(Equal(len(proxyResponse.Headers)))
// TODO: DAD - why is this test here (commented out for now)? Added
// back the logic to copy over headers - without this the
// 'Content-Type' is NOT passed through properly
//Expect(0).To(Equal(len(proxyResponse.Headers)))

// There are two headers here because Content-Type is always written implicitly
Expect(2).To(Equal(len(proxyResponse.MultiValueHeaders["Set-Cookie"])))
Expand Down

0 comments on commit ba4da44

Please sign in to comment.