add function to apply mutations over grpc
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 41s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m50s

This commit is contained in:
matst80
2025-11-28 14:07:43 +01:00
parent 2c0f6c160a
commit 47e69f18a5
12 changed files with 1015 additions and 74 deletions

View File

@@ -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)