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

@@ -2,7 +2,6 @@ package actor
import (
"context"
"errors"
"reflect"
"slices"
"testing"
@@ -90,7 +89,7 @@ func TestRegisteredMutationBasics(t *testing.T) {
}
// Apply nil grain
if _, err := reg.Apply(nil, add); err == nil {
if _, err := reg.Apply(context.Background(), nil, add); err == nil {
t.Fatalf("expected error for nil grain")
}
@@ -100,7 +99,8 @@ func TestRegisteredMutationBasics(t *testing.T) {
}
// Apply unregistered message
if _, err := reg.Apply(context.Background(), state, &messages.Noop{}); !errors.Is(err, ErrMutationNotRegistered) {
_, err := reg.Apply(context.Background(), state, &messages.Noop{})
if err != ErrMutationNotRegistered {
t.Fatalf("expected ErrMutationNotRegistered, got %v", err)
}
}