Skip to content

Commit

Permalink
AWS Lambda: Fix Testing Typos, set helper function
Browse files Browse the repository at this point in the history
Signed-off-by: Trevor Bramwell <[email protected]>
  • Loading branch information
bramwelt committed May 1, 2024
1 parent 0bdc66b commit 506e82a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/middlewares/awslambda/aws_lambda_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ import (
)

// Setup provides a mockserver (lambda handler), and should be closed
// with 'defer func() { mockserver.Close() }()' once recieved
// with 'defer func() { mockserver.Close() }()' once received
func setup(t *testing.T, response string) (*httptest.Server, http.Handler, *http.Request) {
t.Helper()
mockserver := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {

var buf bytes.Buffer
Expand Down Expand Up @@ -198,7 +199,7 @@ func Test_AWSLambdaMiddleware_bodyToBase64_notEncodedJSON(t *testing.T) {
require.NoError(t, err)
}

// Test_AWSLambdaMiddleware_bodyToBase64_notEncodedJSON
// Test_AWSLambdaMiddleware_bodyToBase64_withcontent
func Test_AWSLambdaMiddleware_bodyToBase64_withcontent(t *testing.T) {
// application/zip
expected := "UEsDBA=="
Expand Down

0 comments on commit 506e82a

Please sign in to comment.