fix message fields
All checks were successful
Lint / golangci-lint (push) Successful in 9m40s
Machine Tests / test (push) Successful in 41s

This commit is contained in:
Matthew Rich 2024-05-06 22:59:18 -07:00
parent f42a74531a
commit d126067c56
2 changed files with 4 additions and 4 deletions

View File

@ -60,8 +60,8 @@ func TestMachineAddSubscription(t *testing.T) {
assert.Nil(t, s.Trigger("connect")) assert.Nil(t, s.Trigger("connect"))
exitMessage := <-*x.(*EventChannel) exitMessage := <-*x.(*EventChannel)
enterMessage := <-*x.(*EventChannel) enterMessage := <-*x.(*EventChannel)
if exitMessage.on == EXITSTATEEVENT && exitMessage.source == "disconnected" { if exitMessage.On == EXITSTATEEVENT && exitMessage.Source == "disconnected" {
if enterMessage.on == ENTERSTATEEVENT && enterMessage.dest == "start_connection" { if enterMessage.On == ENTERSTATEEVENT && enterMessage.Dest == "start_connection" {
return return
} }
} }

View File

@ -46,10 +46,10 @@ func TestTransitionSubscribe(t *testing.T) {
assert.Nil(t, s.Run(m)) assert.Nil(t, s.Run(m))
exitEvent := <-*c.(*EventChannel) exitEvent := <-*c.(*EventChannel)
enterEvent := <-*c.(*EventChannel) enterEvent := <-*c.(*EventChannel)
if exitEvent.on != EXITSTATEEVENT { if exitEvent.On != EXITSTATEEVENT {
t.Errorf("Invalid exit event") t.Errorf("Invalid exit event")
} }
if enterEvent.on != ENTERSTATEEVENT { if enterEvent.On != ENTERSTATEEVENT {
t.Errorf("Invalid enter event") t.Errorf("Invalid enter event")
} }
} }