commit
4ac4648b5b
|
@ -117,6 +117,7 @@ func TestCORSHandler(t *testing.T) {
|
|||
}
|
||||
// it is set by http package, and there is no need to test it
|
||||
rr.HeaderMap.Del("Content-Type")
|
||||
rr.HeaderMap.Del("X-Content-Type-Options")
|
||||
if !reflect.DeepEqual(rr.HeaderMap, tt.wheader) {
|
||||
t.Errorf("#%d: header = %+v, want %+v", i, rr.HeaderMap, tt.wheader)
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ func TestNetworkDelay(t *testing.T) {
|
|||
|
||||
w := time.Duration(float64(sent)*delayrate/2) * delay
|
||||
// there are pretty overhead in the send call, since it genarete random numbers.
|
||||
if total < w+10*delay {
|
||||
if total < w {
|
||||
t.Errorf("total = %v, want > %v", total, w)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ func TestBackendPut(t *testing.T) {
|
|||
batchTx.UnsafeCreateBucket([]byte("test"))
|
||||
|
||||
batchTx.UnsafePut([]byte("test"), []byte("foo"), v)
|
||||
gv := batchTx.UnsafeRange([]byte("test"), v, nil, -1)
|
||||
_, gv := batchTx.UnsafeRange([]byte("test"), v, nil, -1)
|
||||
if !reflect.DeepEqual(gv[0], v) {
|
||||
t.Errorf("v = %s, want %s", string(gv[0]), string(v))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue