mirror of https://github.com/perkeep/perkeep.git
fix tests for images and netutil
Change-Id: I89d978ce25cc8748ffab54aa3112e6b854f73b85
This commit is contained in:
parent
306b58afd6
commit
fbead58f92
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue