diff --git a/command/node_drain_test.go b/command/node_drain_test.go index f75d0e503..11b06879e 100644 --- a/command/node_drain_test.go +++ b/command/node_drain_test.go @@ -113,6 +113,9 @@ func TestNodeDrainCommand_Monitor(t *testing.T) { if len(nodes) == 0 { return false, fmt.Errorf("missing node") } + if _, ok := nodes[0].Drivers["mock_driver"]; !ok { + return false, fmt.Errorf("mock_driver not ready") + } nodeID = nodes[0].ID return true, nil }, func(err error) { @@ -186,6 +189,8 @@ func TestNodeDrainCommand_Monitor(t *testing.T) { _, _, err = client.Jobs().Register(sysjob, nil) require.Nil(err) + evals, _, _ := client.Evaluations().List(nil) + var allocs []*api.Allocation testutil.WaitForResult(func() (bool, error) { allocs, _, err = client.Nodes().Allocations(nodeID, nil)