@@ -25,14 +25,14 @@ import (
25
25
"testing"
26
26
"time"
27
27
28
- "github.com/golang/protobuf/ptypes/empty"
29
28
"github.com/google/uuid"
30
29
"github.com/stretchr/testify/assert"
31
30
"github.com/stretchr/testify/require"
32
31
"google.golang.org/grpc"
33
32
"google.golang.org/grpc/credentials/insecure"
34
33
"google.golang.org/grpc/test/bufconn"
35
34
"google.golang.org/protobuf/types/known/anypb"
35
+ "google.golang.org/protobuf/types/known/emptypb"
36
36
37
37
commonv1pb "github.com/dapr/dapr/pkg/proto/common/v1"
38
38
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
@@ -289,11 +289,11 @@ func (s *testDaprServer) GetBulkState(ctx context.Context, in *pb.GetBulkStateRe
289
289
}, nil
290
290
}
291
291
292
- func (s * testDaprServer ) SaveState (ctx context.Context , req * pb.SaveStateRequest ) (* empty .Empty , error ) {
292
+ func (s * testDaprServer ) SaveState (ctx context.Context , req * pb.SaveStateRequest ) (* emptypb .Empty , error ) {
293
293
for _ , item := range req .GetStates () {
294
294
s .state [item .GetKey ()] = item .GetValue ()
295
295
}
296
- return & empty .Empty {}, nil
296
+ return & emptypb .Empty {}, nil
297
297
}
298
298
299
299
func (s * testDaprServer ) QueryStateAlpha1 (ctx context.Context , req * pb.QueryStateRequest ) (* pb.QueryStateResponse , error ) {
@@ -311,19 +311,19 @@ func (s *testDaprServer) QueryStateAlpha1(ctx context.Context, req *pb.QueryStat
311
311
return ret , nil
312
312
}
313
313
314
- func (s * testDaprServer ) DeleteState (ctx context.Context , req * pb.DeleteStateRequest ) (* empty .Empty , error ) {
314
+ func (s * testDaprServer ) DeleteState (ctx context.Context , req * pb.DeleteStateRequest ) (* emptypb .Empty , error ) {
315
315
delete (s .state , req .GetKey ())
316
- return & empty .Empty {}, nil
316
+ return & emptypb .Empty {}, nil
317
317
}
318
318
319
- func (s * testDaprServer ) DeleteBulkState (ctx context.Context , req * pb.DeleteBulkStateRequest ) (* empty .Empty , error ) {
319
+ func (s * testDaprServer ) DeleteBulkState (ctx context.Context , req * pb.DeleteBulkStateRequest ) (* emptypb .Empty , error ) {
320
320
for _ , item := range req .GetStates () {
321
321
delete (s .state , item .GetKey ())
322
322
}
323
- return & empty .Empty {}, nil
323
+ return & emptypb .Empty {}, nil
324
324
}
325
325
326
- func (s * testDaprServer ) ExecuteStateTransaction (ctx context.Context , in * pb.ExecuteStateTransactionRequest ) (* empty .Empty , error ) {
326
+ func (s * testDaprServer ) ExecuteStateTransaction (ctx context.Context , in * pb.ExecuteStateTransactionRequest ) (* emptypb .Empty , error ) {
327
327
for _ , op := range in .GetOperations () {
328
328
item := op .GetRequest ()
329
329
switch opType := op .GetOperationType (); opType {
@@ -332,10 +332,10 @@ func (s *testDaprServer) ExecuteStateTransaction(ctx context.Context, in *pb.Exe
332
332
case "delete" :
333
333
delete (s .state , item .GetKey ())
334
334
default :
335
- return & empty .Empty {}, fmt .Errorf ("invalid operation type: %s" , opType )
335
+ return & emptypb .Empty {}, fmt .Errorf ("invalid operation type: %s" , opType )
336
336
}
337
337
}
338
- return & empty .Empty {}, nil
338
+ return & emptypb .Empty {}, nil
339
339
}
340
340
341
341
func (s * testDaprServer ) GetMetadata (ctx context.Context , req * pb.GetMetadataRequest ) (metadata * pb.GetMetadataResponse , err error ) {
@@ -349,12 +349,12 @@ func (s *testDaprServer) GetMetadata(ctx context.Context, req *pb.GetMetadataReq
349
349
return resp , nil
350
350
}
351
351
352
- func (s * testDaprServer ) SetMetadata (ctx context.Context , req * pb.SetMetadataRequest ) (* empty .Empty , error ) {
353
- return & empty .Empty {}, nil
352
+ func (s * testDaprServer ) SetMetadata (ctx context.Context , req * pb.SetMetadataRequest ) (* emptypb .Empty , error ) {
353
+ return & emptypb .Empty {}, nil
354
354
}
355
355
356
- func (s * testDaprServer ) PublishEvent (ctx context.Context , req * pb.PublishEventRequest ) (* empty .Empty , error ) {
357
- return & empty .Empty {}, nil
356
+ func (s * testDaprServer ) PublishEvent (ctx context.Context , req * pb.PublishEventRequest ) (* emptypb .Empty , error ) {
357
+ return & emptypb .Empty {}, nil
358
358
}
359
359
360
360
// BulkPublishEventAlpha1 mocks the BulkPublishEventAlpha1 API.
@@ -410,12 +410,12 @@ func (s *testDaprServer) GetBulkSecret(ctx context.Context, req *pb.GetBulkSecre
410
410
}, nil
411
411
}
412
412
413
- func (s * testDaprServer ) RegisterActorReminder (ctx context.Context , req * pb.RegisterActorReminderRequest ) (* empty .Empty , error ) {
414
- return & empty .Empty {}, nil
413
+ func (s * testDaprServer ) RegisterActorReminder (ctx context.Context , req * pb.RegisterActorReminderRequest ) (* emptypb .Empty , error ) {
414
+ return & emptypb .Empty {}, nil
415
415
}
416
416
417
- func (s * testDaprServer ) UnregisterActorReminder (ctx context.Context , req * pb.UnregisterActorReminderRequest ) (* empty .Empty , error ) {
418
- return & empty .Empty {}, nil
417
+ func (s * testDaprServer ) UnregisterActorReminder (ctx context.Context , req * pb.UnregisterActorReminderRequest ) (* emptypb .Empty , error ) {
418
+ return & emptypb .Empty {}, nil
419
419
}
420
420
421
421
func (s * testDaprServer ) InvokeActor (context.Context , * pb.InvokeActorRequest ) (* pb.InvokeActorResponse , error ) {
@@ -424,16 +424,16 @@ func (s *testDaprServer) InvokeActor(context.Context, *pb.InvokeActorRequest) (*
424
424
}, nil
425
425
}
426
426
427
- func (s * testDaprServer ) RegisterActorTimer (context.Context , * pb.RegisterActorTimerRequest ) (* empty .Empty , error ) {
428
- return & empty .Empty {}, nil
427
+ func (s * testDaprServer ) RegisterActorTimer (context.Context , * pb.RegisterActorTimerRequest ) (* emptypb .Empty , error ) {
428
+ return & emptypb .Empty {}, nil
429
429
}
430
430
431
- func (s * testDaprServer ) UnregisterActorTimer (context.Context , * pb.UnregisterActorTimerRequest ) (* empty .Empty , error ) {
432
- return & empty .Empty {}, nil
431
+ func (s * testDaprServer ) UnregisterActorTimer (context.Context , * pb.UnregisterActorTimerRequest ) (* emptypb .Empty , error ) {
432
+ return & emptypb .Empty {}, nil
433
433
}
434
434
435
- func (s * testDaprServer ) Shutdown (ctx context.Context , req * pb.ShutdownRequest ) (* empty .Empty , error ) {
436
- return & empty .Empty {}, nil
435
+ func (s * testDaprServer ) Shutdown (ctx context.Context , req * pb.ShutdownRequest ) (* emptypb .Empty , error ) {
436
+ return & emptypb .Empty {}, nil
437
437
}
438
438
439
439
func (s * testDaprServer ) GetConfiguration (ctx context.Context , in * pb.GetConfigurationRequest ) (* pb.GetConfigurationResponse , error ) {
0 commit comments