From fb6c821526ee7555fae795db0dc2cae9286f8a79 Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Tue, 6 Mar 2018 13:12:36 -0800 Subject: [PATCH] Fix node eligibility test --- command/node_eligibility_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/command/node_eligibility_test.go b/command/node_eligibility_test.go index 3129fe86a..6fbb3c91d 100644 --- a/command/node_eligibility_test.go +++ b/command/node_eligibility_test.go @@ -37,8 +37,9 @@ func TestNodeEligibilityCommand_Fails(t *testing.T) { if code := cmd.Run([]string{"-address=nope", "-enable", "12345678-abcd-efab-cdef-123456789abc"}); code != 1 { t.Fatalf("expected exit code 1, got: %d", code) } - if out := ui.ErrorWriter.String(); !strings.Contains(out, "Error toggling") { - t.Fatalf("expected failed toggle error, got: %s", out) + expected := "Error updating scheduling eligibility" + if out := ui.ErrorWriter.String(); !strings.Contains(out, expected) { + t.Fatalf("expected %q, got: %s", expected, out) } ui.ErrorWriter.Reset()