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 31, 2017
1 parent 79660db commit 341664f
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 341664f

Please sign in to comment.