fix message fields
This commit is contained in:
parent
f42a74531a
commit
d126067c56
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user