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.
This commit is contained in:
Kynan Ware 2025-09-02 12:52:52 -06:00
parent 97da7fc1d2
commit 4a07cdf940

View file

@ -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