INNER CODE UNIT · Go

TestAPIGatewayV1ProxyPath

akrylysov/algnhsa · apigw_v1_test.go:162

func TestAPIGatewayV1ProxyPath(t *testing.T) {
	asrt := assert.New(t)

	dump, err := dumpAPIGatewayV1([]byte(apiGatewayV1TestEvent), Options{UseProxyPath: true})
	asrt.NoError(err)

	expected := expectedApiGatewayV1Dump
	expected.RequestURI = "/my/path2?parameter1=value1&parameter1=value2&parameter2=value"
	expected.URL.Path = "/my/path2"
	asrt.Equal(expected, dump)
}

func TestAPIGatewayV1Base64BodyRequest(t *testing.T) {
	asrt := assert.New(t)

	event := events.APIGatewayProxyRequest{}
	asrt.NoError(json.Unmarshal([]byte(apiGatewayV1TestEvent), &event))
	event.IsBase64Encoded = true

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…