slightly reorganize code to make it easier to read
@@ -12,9 +12,6 @@ import (
func TestExecuteCheck(t *testing.T) {
check := types.FixtureCheck("check")
- // Does this work on windows?
- check.Command = "true"
-
event := &types.Event{}
event.Check = check
@@ -23,6 +20,9 @@ func TestExecuteCheck(t *testing.T) {
ch := make(chan *transport.Message, 1)
agent.sendq = ch
+ // Does this work on windows?
+ check.Command = "true"
+
agent.executeCheck(event)
msg := <-ch
