integration: test with new server errors

This commit is contained in:
Gyu-Ho Lee
2016-04-29 11:03:54 -07:00
parent b3ebe66c97
commit ec1fdd3938
5 changed files with 45 additions and 33 deletions

View File

@ -106,7 +106,7 @@ func TestV3LeaseGrantByID(t *testing.T) {
lresp, err = toGRPC(clus.RandClient()).Lease.LeaseGrant(
context.TODO(),
&pb.LeaseGrantRequest{ID: 1, TTL: 1})
if err != rpctypes.ErrLeaseExist {
if err != rpctypes.ErrGRPCLeaseExist {
t.Error(err)
}
@ -242,8 +242,8 @@ func TestV3PutOnNonExistLease(t *testing.T) {
badLeaseID := int64(0x12345678)
putr := &pb.PutRequest{Key: []byte("foo"), Value: []byte("bar"), Lease: badLeaseID}
_, err := toGRPC(clus.RandClient()).KV.Put(ctx, putr)
if err != rpctypes.ErrLeaseNotFound {
t.Errorf("err = %v, want %v", err, rpctypes.ErrCompacted)
if err != rpctypes.ErrGRPCLeaseNotFound {
t.Errorf("err = %v, want %v", err, rpctypes.ErrGRPCCompacted)
}
}
@ -424,7 +424,7 @@ func leaseExist(t *testing.T, clus *ClusterV3, leaseID int64) bool {
return false
}
if err == rpctypes.ErrLeaseExist {
if err == rpctypes.ErrGRPCLeaseExist {
return true
}
t.Fatalf("unexpecter error %v", err)