Skip to content

Commit 96c5076

Browse files
authored
fix(coderd): remove troublesome test case (#9874)
1 parent c4718fd commit 96c5076

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

coderd/insights_internal_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,23 @@ func Test_parseInsightsInterval_week(t *testing.T) {
159159
require.NoError(t, err)
160160

161161
now := time.Now()
162+
t.Logf("now: %s", now)
163+
162164
y, m, d := now.Date()
163165
today := time.Date(y, m, d, 0, 0, 0, 0, sydneyLoc)
166+
t.Logf("today: %s", today)
164167

165168
thisHour := time.Date(y, m, d, now.Hour(), 0, 0, 0, sydneyLoc)
169+
t.Logf("thisHour: %s", thisHour)
166170
twoHoursAgo := thisHour.Add(-2 * time.Hour)
171+
t.Logf("twoHoursAgo: %s", twoHoursAgo)
167172
thirteenDaysAgo := today.AddDate(0, 0, -13)
173+
t.Logf("thirteenDaysAgo: %s", thirteenDaysAgo)
168174

169175
sixDaysAgo := today.AddDate(0, 0, -6)
176+
t.Logf("sixDaysAgo: %s", sixDaysAgo)
170177
nineDaysAgo := today.AddDate(0, 0, -9)
178+
t.Logf("nineDaysAgo: %s", nineDaysAgo)
171179

172180
type args struct {
173181
startTime string
@@ -186,14 +194,6 @@ func Test_parseInsightsInterval_week(t *testing.T) {
186194
},
187195
wantOk: true,
188196
},
189-
{
190-
name: "Two weeks",
191-
args: args{
192-
startTime: thirteenDaysAgo.Format(layout),
193-
endTime: twoHoursAgo.Format(layout),
194-
},
195-
wantOk: true,
196-
},
197197
{
198198
name: "One full week",
199199
args: args{

0 commit comments

Comments
 (0)