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

Commitae8a912

Browse files
committed
Fix loop var capture
1 parent5e89d05 commitae8a912

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎coderd/prometheusmetrics/aggregator_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ import (
88
"testing"
99
"time"
1010

11-
"cdr.dev/slog/sloggers/slogtest"
12-
"github.com/coder/coder/v2/coderd/agentmetrics"
1311
"github.com/prometheus/client_golang/prometheus"
1412
dto"github.com/prometheus/client_model/go"
1513
"github.com/stretchr/testify/assert"
1614
"github.com/stretchr/testify/require"
1715

16+
"cdr.dev/slog/sloggers/slogtest"
17+
"github.com/coder/coder/v2/coderd/agentmetrics"
18+
1819
agentproto"github.com/coder/coder/v2/agent/proto"
1920
"github.com/coder/coder/v2/coderd/prometheusmetrics"
2021
"github.com/coder/coder/v2/cryptorand"
@@ -318,7 +319,7 @@ func TestLabelsAggregation(t *testing.T) {
318319
aggregateOn []string
319320
}{
320321
{
321-
name:"label aggregations not specified, keep all (high cardinality, defaultbehaviour)",
322+
name:"label aggregations not specified, keep all (high cardinality, defaultbehavior)",
322323
given: []statCollection{
323324
{
324325
labels:testLabels,
@@ -561,6 +562,8 @@ func TestLabelsAggregation(t *testing.T) {
561562
}
562563

563564
for_,tc:=rangetests {
565+
tc:=tc
566+
564567
t.Run(tc.name,func(t*testing.T) {
565568
t.Parallel()
566569

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp