Fix validate test

This commit is contained in:
Alex Dadgar 2016-03-17 11:29:41 -07:00
parent 914207a5c2
commit 52aac4421f
1 changed files with 2 additions and 1 deletions

View File

@ -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") {