mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3/integration: test "rpctypes.ErrLeaseTTLTooLarge"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
eaa0050d4d
commit
d1da2023b9
@ -55,6 +55,11 @@ func TestLeaseGrant(t *testing.T) {
|
|||||||
|
|
||||||
kv := clus.RandClient()
|
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)
|
resp, err := lapi.Grant(context.Background(), 10)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("failed to create lease %v", err)
|
t.Errorf("failed to create lease %v", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user