MCPcopy Index your code
hub / github.com/aws/aws-lambda-go / TestRequestSentCorrectly

Function TestRequestSentCorrectly

cfn/response_test.go:47–64  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

45func (nopCloser) Close() error { return nil }
46
47func TestRequestSentCorrectly(t *testing.T) {
48 r := &Response{
49 Status: StatusSuccess,
50 url: "http://pre-signed-S3-url-for-response",
51 }
52
53 client := &mockClient{
54 DoFunc: func(req *http.Request) (*http.Response, error) {
55 assert.NotContains(t, req.Header, "Content-Type")
56 return &http.Response{
57 StatusCode: http.StatusOK,
58 Body: nopCloser{bytes.NewBufferString("")},
59 }, nil
60 },
61 }
62
63 assert.NoError(t, r.sendWith(client))
64}
65
66func TestRequestForbidden(t *testing.T) {
67 r := &Response{

Callers

nothing calls this directly

Calls 1

sendWithMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…