瀏覽代碼

fix accidental closure on parent testing.T. (#470)

Margaret Nolan 6 年之前
父節點
當前提交
8358a9778b
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      internal/driver/driver_test.go

+ 3
- 3
internal/driver/driver_test.go 查看文件

@@ -1154,7 +1154,7 @@ func TestTagFilter(t *testing.T) {
1154 1154
 		},
1155 1155
 	}
1156 1156
 	for _, test := range tagFilterTests {
1157
-		t.Run(test.desc, func(*testing.T) {
1157
+		t.Run(test.desc, func(t *testing.T) {
1158 1158
 			filter, err := compileTagFilter(test.desc, test.value, nil, &proftest.TestUI{T: t}, nil)
1159 1159
 			if err != nil {
1160 1160
 				t.Fatalf("tagFilter %s:%v", test.desc, err)
@@ -1280,7 +1280,7 @@ func TestIdentifyNumLabelUnits(t *testing.T) {
1280 1280
 		},
1281 1281
 	}
1282 1282
 	for _, test := range tagFilterTests {
1283
-		t.Run(test.desc, func(*testing.T) {
1283
+		t.Run(test.desc, func(t *testing.T) {
1284 1284
 			p := profile.Profile{Sample: make([]*profile.Sample, len(test.tagVals))}
1285 1285
 			for i, numLabel := range test.tagVals {
1286 1286
 				s := profile.Sample{
@@ -1457,7 +1457,7 @@ func TestNumericTagFilter(t *testing.T) {
1457 1457
 		},
1458 1458
 	}
1459 1459
 	for _, test := range tagFilterTests {
1460
-		t.Run(test.desc, func(*testing.T) {
1460
+		t.Run(test.desc, func(t *testing.T) {
1461 1461
 			wantErrMsg := strings.Join([]string{"(", test.desc, ":Interpreted '", test.value[strings.Index(test.value, "=")+1:], "' as range, not regexp", ")"}, "")
1462 1462
 			filter, err := compileTagFilter(test.desc, test.value, test.identifiedUnits, &proftest.TestUI{T: t,
1463 1463
 				AllowRx: wantErrMsg}, nil)