From 52aac4421f787f5d7fb4b09d16a74f5d7d83f4d4 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 17 Mar 2016 11:29:41 -0700 Subject: [PATCH] Fix validate test --- nomad/structs/structs_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nomad/structs/structs_test.go b/nomad/structs/structs_test.go index 7b1e0d2b3..1b2ce9517 100644 --- a/nomad/structs/structs_test.go +++ b/nomad/structs/structs_test.go @@ -196,6 +196,7 @@ func TestJob_IsPeriodic(t *testing.T) { func TestTaskGroup_Validate(t *testing.T) { tg := &TaskGroup{ + Count: -1, RestartPolicy: &RestartPolicy{ Interval: 5 * time.Minute, Delay: 10 * time.Second, @@ -208,7 +209,7 @@ func TestTaskGroup_Validate(t *testing.T) { if !strings.Contains(mErr.Errors[0].Error(), "group name") { t.Fatalf("err: %s", err) } - if !strings.Contains(mErr.Errors[1].Error(), "count must be positive") { + if !strings.Contains(mErr.Errors[1].Error(), "count can't be negative") { t.Fatalf("err: %s", err) } if !strings.Contains(mErr.Errors[2].Error(), "Missing tasks") {