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

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
This commit is contained in:
Piotr Sikora 2017-11-02 21:13:25 -07:00
parent 8c0ea56bb8
commit 61efa15a14
2 changed files with 3 additions and 3 deletions

View File

@ -211,7 +211,7 @@ func TestH1H1GracefulShutdown(t *testing.T) {
want := io.EOF want := io.EOF
b := make([]byte, 256) b := make([]byte, 256)
if _, err := st.conn.Read(b); err == nil || err != want { 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)
} }
} }

View File

@ -1204,10 +1204,10 @@ func TestH2H1ProxyProtocolV1TCP6(t *testing.T) {
func TestH2H1ProxyProtocolV1Unknown(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) { 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 { 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 { 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() defer st.Close()