diff --git a/pkg/images/images_test.go b/pkg/images/images_test.go index e834ed451..8e99edfa8 100644 --- a/pkg/images/images_test.go +++ b/pkg/images/images_test.go @@ -80,7 +80,7 @@ func TestExifCorrection(t *testing.T) { t.Fatal(err) } defer f.Close() - im, err := Decode(f, nil) + im, _, err := Decode(f, nil) if err != nil { t.Fatal(err) } @@ -124,7 +124,7 @@ func TestForcedCorrection(t *testing.T) { case '8': angle = 90 } - im, err := Decode(f, &DecodeOpts{Rotate: angle, Flip: FlipDirection(flipMode)}) + im, _, err := Decode(f, &DecodeOpts{Rotate: angle, Flip: FlipDirection(flipMode)}) if err != nil { t.Fatal(err) } diff --git a/pkg/netutil/ident_test.go b/pkg/netutil/ident_test.go index 6a8fdb028..0eeb01c23 100644 --- a/pkg/netutil/ident_test.go +++ b/pkg/netutil/ident_test.go @@ -97,8 +97,11 @@ func testLocalListener(t *testing.T, ln net.Listener) { func TestHTTPAuth(t *testing.T) { var ts *httptest.Server ts = httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { - from := r.RemoteAddr - to := ts.Listener.Addr().String() + from, err := HostPortToIP(r.RemoteAddr) + if err != nil { + t.Fatal(err) + } + to := ts.Listener.Addr() uid, err := AddrPairUserid(from, to) if err != nil { fmt.Fprintf(rw, "ERR: %v", err)