diff --git a/tsuru/client/apps.go b/tsuru/client/apps.go index 596c108d..b864440e 100644 --- a/tsuru/client/apps.go +++ b/tsuru/client/apps.go @@ -827,8 +827,8 @@ func buildScheduleInfo(schedule tsuru.AutoScaleSchedule) string { startTimeHuman, _ := exprDesc.ToDescription(schedule.Start, cron.Locale_en) endTimeHuman, _ := exprDesc.ToDescription(schedule.End, cron.Locale_en) - return fmt.Sprintf("Start: %s (%s)\nEnd: %s (%s)\nUnits: %d", - startTimeHuman, schedule.Start, endTimeHuman, schedule.End, schedule.MinReplicas, + return fmt.Sprintf("Start: %s (%s)\nEnd: %s (%s)\nUnits: %d\nTimezone: %s", + startTimeHuman, schedule.Start, endTimeHuman, schedule.End, schedule.MinReplicas, schedule.Timezone, ) } diff --git a/tsuru/client/apps_test.go b/tsuru/client/apps_test.go index 3c19571f..8fe53034 100644 --- a/tsuru/client/apps_test.go +++ b/tsuru/client/apps_test.go @@ -1611,14 +1611,14 @@ Process: web (v10), Min Units: 1, Max Units: 10 +----------+-----------------+ | Triggers | Trigger details | +----------+-----------------+ -| CPU | Target: 20% | +| CPU | Target: 50% | +----------+-----------------+ Process: worker (v10), Min Units: 2, Max Units: 5 +----------+-----------------+ | Triggers | Trigger details | +----------+-----------------+ -| CPU | Target: 20% | +| CPU | Target: 200% | +----------+-----------------+ ` @@ -1697,7 +1697,7 @@ func (s *S) TestAppInfoWithKEDAAutoScale(c *check.C) { "minReplicas":1, "start":"0 0 * * *", "end":"0 6 * * *", - "timezone":"UTC" + "timezone":"America/Sao_Paulo" } ] } @@ -1733,26 +1733,29 @@ Process: web (v10), Min Units: 1, Max Units: 10 +----------+---------------------------------+ | Triggers | Trigger details | +----------+---------------------------------+ -| CPU | Target: 20% | +| CPU | Target: 50% | +----------+---------------------------------+ | Schedule | Start: At 06:00 AM (0 6 * * *) | | | End: At 06:00 PM (0 18 * * *) | | | Units: 2 | +| | Timezone: UTC | +----------+---------------------------------+ | Schedule | Start: At 12:00 PM (0 12 * * *) | | | End: At 03:00 PM (0 15 * * *) | | | Units: 3 | +| | Timezone: UTC | +----------+---------------------------------+ Process: worker (v10), Min Units: 2, Max Units: 5 +----------+--------------------------------+ | Triggers | Trigger details | +----------+--------------------------------+ -| CPU | Target: 20% | +| CPU | Target: 200% | +----------+--------------------------------+ | Schedule | Start: At 12:00 AM (0 0 * * *) | | | End: At 06:00 AM (0 6 * * *) | | | Units: 1 | +| | Timezone: America/Sao_Paulo | +----------+--------------------------------+ `