mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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
|
// it is set by http package, and there is no need to test it
|
||||||
rr.HeaderMap.Del("Content-Type")
|
rr.HeaderMap.Del("Content-Type")
|
||||||
|
rr.HeaderMap.Del("X-Content-Type-Options")
|
||||||
if !reflect.DeepEqual(rr.HeaderMap, tt.wheader) {
|
if !reflect.DeepEqual(rr.HeaderMap, tt.wheader) {
|
||||||
t.Errorf("#%d: header = %+v, want %+v", i, 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
|
w := time.Duration(float64(sent)*delayrate/2) * delay
|
||||||
// there are pretty overhead in the send call, since it genarete random numbers.
|
// 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)
|
t.Errorf("total = %v, want > %v", total, w)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ func TestBackendPut(t *testing.T) {
|
|||||||
batchTx.UnsafeCreateBucket([]byte("test"))
|
batchTx.UnsafeCreateBucket([]byte("test"))
|
||||||
|
|
||||||
batchTx.UnsafePut([]byte("test"), []byte("foo"), v)
|
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) {
|
if !reflect.DeepEqual(gv[0], v) {
|
||||||
t.Errorf("v = %s, want %s", string(gv[0]), string(v))
|
t.Errorf("v = %s, want %s", string(gv[0]), string(v))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user