(t *testing.T)
| 26 | ) |
| 27 | |
| 28 | func TestRequestHost(t *testing.T) { |
| 29 | req, _ := buildRequest("dynamodb", "us-east-1", "{}") |
| 30 | req.URL.RawQuery = "Foo=z&Foo=o&Foo=m&Foo=a" |
| 31 | req.Host = "myhost" |
| 32 | canonicalHeaders := getCanonicalHeaders(*req, v4IgnoredHeaders) |
| 33 | |
| 34 | if !strings.Contains(canonicalHeaders, "host:"+req.Host) { |
| 35 | t.Errorf("canonical host header invalid") |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | func buildRequest(serviceName, region, body string) (*http.Request, io.ReadSeeker) { |
| 40 | endpoint := "https://" + serviceName + "." + region + ".amazonaws.com" |
nothing calls this directly
no test coverage detected