integration: test with new server errors
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user