From 4a07cdf94049791e670fac48f2cd71f0c7490a48 Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Tue, 2 Sep 2025 12:52:52 -0600 Subject: [PATCH] Simplify time calculation in listRun test Replaces explicit duration parsing with direct multiplication for calculating a timestamp 6 hours ago in Test_listRun, improving code clarity. --- pkg/cmd/agent-task/list/list_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/cmd/agent-task/list/list_test.go b/pkg/cmd/agent-task/list/list_test.go index a2c9d62ea..0df882b25 100644 --- a/pkg/cmd/agent-task/list/list_test.go +++ b/pkg/cmd/agent-task/list/list_test.go @@ -77,9 +77,7 @@ func TestNewCmdList(t *testing.T) { } func Test_listRun(t *testing.T) { - sixHours, _ := time.ParseDuration("6h") - sixHoursAgo := time.Now().Add(-sixHours) - createdAt := sixHoursAgo.Format(time.RFC3339) + createdAt := time.Now().Add(-6 * time.Hour).Format(time.RFC3339) // 6h ago tests := []struct { name string