mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
integration: test txn lease comparisons
This commit is contained in:
parent
79660db61b
commit
341664f7b6
@ -564,6 +564,28 @@ func TestV3TxnRangeCompare(t *testing.T) {
|
|||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// all keys are leased
|
||||||
|
pb.Compare{
|
||||||
|
Key: []byte("/a/"),
|
||||||
|
RangeEnd: []byte("/a0"),
|
||||||
|
Target: pb.Compare_LEASE,
|
||||||
|
Result: pb.Compare_GREATER,
|
||||||
|
TargetUnion: &pb.Compare_Lease{0},
|
||||||
|
},
|
||||||
|
false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// no keys are leased
|
||||||
|
pb.Compare{
|
||||||
|
Key: []byte("/a/"),
|
||||||
|
RangeEnd: []byte("/a0"),
|
||||||
|
Target: pb.Compare_LEASE,
|
||||||
|
Result: pb.Compare_EQUAL,
|
||||||
|
TargetUnion: &pb.Compare_Lease{0},
|
||||||
|
},
|
||||||
|
true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
kvc := toGRPC(clus.Client(0)).KV
|
kvc := toGRPC(clus.Client(0)).KV
|
||||||
|
Loading…
x
Reference in New Issue
Block a user