add function to apply mutations over grpc
This commit is contained in:
@@ -267,10 +267,10 @@ func TestMutationRegistryCoverage(t *testing.T) {
|
||||
t.Fatalf("GetTypeName failed for AddItem, got (%q,%v)", nm, ok)
|
||||
}
|
||||
|
||||
// Apply unregistered message -> result should contain ErrMutationNotRegistered, no top-level error
|
||||
// Apply unregistered message -> should return error
|
||||
results, err := reg.Apply(context.Background(), newTestGrain(), &messages.Noop{})
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected top-level error applying unregistered mutation: %v", err)
|
||||
if err == nil {
|
||||
t.Fatalf("expected error for unregistered mutation")
|
||||
}
|
||||
if len(results) != 1 || results[0].Error == nil || results[0].Error != actor.ErrMutationNotRegistered {
|
||||
t.Fatalf("expected ApplyResult with ErrMutationNotRegistered, got %#v", results)
|
||||
|
||||
Reference in New Issue
Block a user