From adf86c2f7868e338f4ca3fadff47c4b7d4631205 Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Wed, 10 Feb 2016 13:36:47 -0800 Subject: [PATCH] Fixing the api tests --- api/tasks.go | 6 ++++++ api/util_test.go | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/api/tasks.go b/api/tasks.go index 04056da21..8b2ae3927 100644 --- a/api/tasks.go +++ b/api/tasks.go @@ -133,6 +133,12 @@ func (t *Task) Constrain(c *Constraint) *Task { return t } +// SetLogConfig sets a log config to a task +func (t *Task) SetLogConfig(l *LogConfig) *Task { + t.LogConfig = l + return t +} + // TaskState tracks the current state of a task and events that caused state // transistions. type TaskState struct { diff --git a/api/util_test.go b/api/util_test.go index 30feafdd3..190e0f3e7 100644 --- a/api/util_test.go +++ b/api/util_test.go @@ -26,6 +26,10 @@ func testJob() *Job { MemoryMB: 256, DiskMB: 25, IOPS: 10, + }). + SetLogConfig(&LogConfig{ + MaxFiles: 10, + MaxFileSizeMB: 10, }) group := NewTaskGroup("group1", 1).