Skip to content

Commit

Permalink
integration: test txn lease comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Romano committed Jul 28, 2017
1 parent fad6d04 commit 68934a9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions integration/v3_grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,28 @@ func TestV3TxnRangeCompare(t *testing.T) {
},
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
Expand Down

0 comments on commit 68934a9

Please sign in to comment.