(t *testing.T)
| 41 | } |
| 42 | |
| 43 | func TestIdLeaseOverflow(t *testing.T) { |
| 44 | dialOpts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())} |
| 45 | con, err := grpc.NewClient(testutil.GetSockAddrZero(), dialOpts...) |
| 46 | require.NoError(t, err) |
| 47 | zc := pb.NewZeroClient(con) |
| 48 | |
| 49 | _, err = zc.AssignIds(context.Background(), &pb.Num{Val: 100, Type: pb.Num_UID}) |
| 50 | require.NoError(t, err) |
| 51 | |
| 52 | _, err = zc.AssignIds(context.Background(), &pb.Num{Val: math.MaxUint64 - 10, Type: pb.Num_UID}) |
| 53 | require.Error(t, err) |
| 54 | require.Contains(t, err.Error(), "limit has reached") |
| 55 | } |
| 56 | |
| 57 | func TestIdBump(t *testing.T) { |
| 58 | dialOpts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())} |
nothing calls this directly
no test coverage detected
searching dependent graphs…