From 646cef4cef90c0f1db6eba28e18e5a48d82d9089 Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Mon, 29 Jan 2018 10:06:58 -0600 Subject: [PATCH] Flaky contains check replaced with regex --- command/alloc_status_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/alloc_status_test.go b/command/alloc_status_test.go index 1ad795dfe..3e5165bb2 100644 --- a/command/alloc_status_test.go +++ b/command/alloc_status_test.go @@ -2,9 +2,9 @@ package command import ( "fmt" + "regexp" "strings" "testing" - "time" "github.com/hashicorp/nomad/helper/uuid" @@ -196,7 +196,7 @@ func TestAllocStatusCommand_Run(t *testing.T) { } out = ui.OutputWriter.String() require.Contains(out, "Rescheduled Alloc ID") - require.Contains(out, "Reschedule Attempts = 1/2") + require.Regexp(regexp.MustCompile(".*Reschedule Attempts\\s*=\\s*1/2"), out) }