From ea0fda66eb1867edd80458ecddd71ced06dae6c1 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Thu, 8 Mar 2018 10:19:30 -0800 Subject: [PATCH] clientv3/integration: test "rpctypes.ErrLeaseTTLTooLarge" Signed-off-by: Gyuho Lee --- clientv3/integration/lease_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clientv3/integration/lease_test.go b/clientv3/integration/lease_test.go index d209eb0e561..fca3f2529a6 100644 --- a/clientv3/integration/lease_test.go +++ b/clientv3/integration/lease_test.go @@ -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)