Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb4a50c3

Browse files
committed
cleanup
1 parentf190d80 commitb4a50c3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎coderd/insights_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ func TestTemplateInsights_Golden(t *testing.T) {
11431143
makeRequest:func(templates []*testTemplate) codersdk.TemplateInsightsRequest {
11441144
return codersdk.TemplateInsightsRequest{
11451145
StartTime:weekAgo,
1146-
EndTime:lastNight,
1146+
EndTime:weekAgo.AddDate(0,0,7),
11471147
Interval:codersdk.InsightsReportIntervalDay,
11481148
}
11491149
},
@@ -1154,7 +1154,7 @@ func TestTemplateInsights_Golden(t *testing.T) {
11541154
return codersdk.TemplateInsightsRequest{
11551155
TemplateIDs: []uuid.UUID{templates[0].id,templates[1].id,templates[2].id},
11561156
StartTime:weekAgo,
1157-
EndTime:lastNight,
1157+
EndTime:weekAgo.AddDate(0,0,7),
11581158
Interval:codersdk.InsightsReportIntervalDay,
11591159
}
11601160
},
@@ -1165,7 +1165,7 @@ func TestTemplateInsights_Golden(t *testing.T) {
11651165
return codersdk.TemplateInsightsRequest{
11661166
TemplateIDs: []uuid.UUID{templates[0].id},
11671167
StartTime:weekAgo,
1168-
EndTime:lastNight,
1168+
EndTime:weekAgo.AddDate(0,0,7),
11691169
Interval:codersdk.InsightsReportIntervalDay,
11701170
}
11711171
},
@@ -1176,7 +1176,7 @@ func TestTemplateInsights_Golden(t *testing.T) {
11761176
return codersdk.TemplateInsightsRequest{
11771177
TemplateIDs: []uuid.UUID{templates[1].id},
11781178
StartTime:weekAgo,
1179-
EndTime:lastNight,
1179+
EndTime:weekAgo.AddDate(0,0,7),
11801180
Interval:codersdk.InsightsReportIntervalDay,
11811181
}
11821182
},
@@ -1187,7 +1187,7 @@ func TestTemplateInsights_Golden(t *testing.T) {
11871187
return codersdk.TemplateInsightsRequest{
11881188
TemplateIDs: []uuid.UUID{templates[2].id},
11891189
StartTime:weekAgo,
1190-
EndTime:lastNight,
1190+
EndTime:weekAgo.AddDate(0,0,7),
11911191
Interval:codersdk.InsightsReportIntervalDay,
11921192
}
11931193
},
@@ -1233,7 +1233,7 @@ func TestTemplateInsights_Golden(t *testing.T) {
12331233
}
12341234
}
12351235

1236-
client,toStableTemplateID:=prepare(t,templates,users,testData)
1236+
client,toStableTemplateIDs:=prepare(t,templates,users,testData)
12371237

12381238
for_,req:=rangett.requests {
12391239
req:=req
@@ -1245,7 +1245,7 @@ func TestTemplateInsights_Golden(t *testing.T) {
12451245
report,err:=client.TemplateInsights(ctx,req.makeRequest(templates))
12461246
require.NoError(t,err,"want no error getting template insights")
12471247

1248-
stabilizeReportForGoldenComparison(&report,toStableTemplateID)
1248+
stabilizeReportForGoldenComparison(&report,toStableTemplateIDs)
12491249

12501250
partialName:=strings.Join(strings.Split(t.Name(),"/")[1:],"_")
12511251
goldenFile:=filepath.Join("testdata","insights",partialName+".json.golden")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp