Skip to content

Commit

Permalink
fix actor reference marshalling test
Browse files Browse the repository at this point in the history
  • Loading branch information
aratz-lasa committed May 20, 2023
1 parent 2c50d90 commit 25cd9c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion virtual/types/ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func NewActorReference(
ServerVersion: serverVersion,
ServerState: serverState,
},
Type: ReferenceTypeLocal,
}, nil
}

Expand All @@ -55,7 +56,7 @@ func NewActorReferenceFromJSON(data []byte) (ActorReference, error) {
// ActorReference abstracts over different forms of ReferenceType. It provides all the
// necessary information for communicating with an actor. Some of the fields are "logical"
type ActorReference struct {
Type ReferenceType `json:"type"`
Type ReferenceType `json:"-"`
Virtual ActorReferenceVirtual `json:"virtual"`
Physical ActorReferencePhysical `json:"physical"`
}
Expand Down
2 changes: 1 addition & 1 deletion virtual/types/ref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TestNewActorReference(t *testing.T) {
require.NoError(t, err)

require.Equal(t, "server1", ref.Physical.ServerID)
require.Equal(t, "server1path", ref.Physical.ServerID)
require.Equal(t, "server1path", ref.Physical.ServerState.Address)
require.Equal(t, "a", ref.Virtual.Namespace)
require.Equal(t, "c", ref.Virtual.ActorID)
require.Equal(t, "b", ref.Virtual.ModuleID)
Expand Down

0 comments on commit 25cd9c8

Please sign in to comment.