From 403227474852139224b473670a4d391962cfcf46 Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Wed, 29 Jan 2014 18:39:36 +0200 Subject: [PATCH] fixed next start time test --- engine/actions_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/actions_test.go b/engine/actions_test.go index 1a8dcad2b..5f9c039b7 100644 --- a/engine/actions_test.go +++ b/engine/actions_test.go @@ -115,8 +115,9 @@ func TestActionTimingHourMonthdays(t *testing.T) { func TestActionTimingOnlyMonths(t *testing.T) { now := time.Now() - y, m, d := now.Date() - nextMonth := time.Date(y, m, d, 0, 0, 0, 0, time.Local).AddDate(0, 1, 0) + y, m, _ := now.Date() + nextMonth := time.Date(y, m, 1, 0, 0, 0, 0, time.Local).AddDate(0, 1, 0) + t.Log("NextMonth: ", nextMonth) at := &ActionTiming{Timing: &RateInterval{Timing: &RITiming{Months: utils.Months{time.February, time.May, nextMonth.Month()}}}} st := at.GetNextStartTime() expected := time.Date(nextMonth.Year(), nextMonth.Month(), 1, 0, 0, 0, 0, time.Local)