Commit 61efa15a authored by Piotr Sikora's avatar Piotr Sikora

integration: Fix issues reported by the `go vet` tool.

Signed-off-by: default avatarPiotr Sikora <piotrsikora@google.com>
parent 8c0ea56b
......@@ -211,7 +211,7 @@ func TestH1H1GracefulShutdown(t *testing.T) {
want := io.EOF
b := make([]byte, 256)
if _, err := st.conn.Read(b); err == nil || err != want {
t.Errorf("st.conn.Read(): %v; want %v, %v", err, want)
t.Errorf("st.conn.Read(): %v; want %v", err, want)
}
}
......
......@@ -1204,10 +1204,10 @@ func TestH2H1ProxyProtocolV1TCP6(t *testing.T) {
func TestH2H1ProxyProtocolV1Unknown(t *testing.T) {
st := newServerTester([]string{"--accept-proxy-protocol", "--add-x-forwarded-for", "--add-forwarded=for", "--forwarded-for=ip"}, t, func(w http.ResponseWriter, r *http.Request) {
if got, notWant := r.Header.Get("X-Forwarded-For"), "192.168.0.2"; got == notWant {
t.Errorf("X-Forwarded-For: %v")
t.Errorf("X-Forwarded-For: %v; want something else", got)
}
if got, notWant := r.Header.Get("Forwarded"), "for=192.168.0.2"; got == notWant {
t.Errorf("Forwarded: %v")
t.Errorf("Forwarded: %v; want something else", got)
}
})
defer st.Close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment