Skip to content

Commit

Permalink
clientv3/integration: test "rpctypes.ErrLeaseTTLTooLarge"
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
  • Loading branch information
gyuho committed Mar 8, 2018
1 parent 6e5e3d1 commit ea0fda6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clientv3/integration/lease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ func TestLeaseGrant(t *testing.T) {

kv := clus.RandClient()

_, merr := lapi.Grant(context.Background(), clientv3.MaxLeaseTTL+1)
if merr != rpctypes.ErrLeaseTTLTooLarge {
t.Fatalf("err = %v, want %v", merr, rpctypes.ErrLeaseTTLTooLarge)
}

resp, err := lapi.Grant(context.Background(), 10)
if err != nil {
t.Errorf("failed to create lease %v", err)
Expand Down

0 comments on commit ea0fda6

Please sign in to comment.