|
@@ -1455,6 +1455,55 @@ func TestNumericTagFilter(t *testing.T) {
|
1455
|
1455
|
map[string]string{"bytes": "bytes"},
|
1456
|
1456
|
false,
|
1457
|
1457
|
},
|
|
1458
|
+ {
|
|
1459
|
+ "Match exact value, unitless tag",
|
|
1460
|
+ "pid=123",
|
|
1461
|
+ map[string][]int64{"pid": {123}},
|
|
1462
|
+ nil,
|
|
1463
|
+ true,
|
|
1464
|
+ },
|
|
1465
|
+ {
|
|
1466
|
+ "Match range, unitless tag",
|
|
1467
|
+ "pid=123:123",
|
|
1468
|
+ map[string][]int64{"pid": {123}},
|
|
1469
|
+ nil,
|
|
1470
|
+ true,
|
|
1471
|
+ },
|
|
1472
|
+ {
|
|
1473
|
+ "Don't match range, unitless tag",
|
|
1474
|
+ "pid=124:124",
|
|
1475
|
+ map[string][]int64{"pid": {123}},
|
|
1476
|
+ nil,
|
|
1477
|
+ false,
|
|
1478
|
+ },
|
|
1479
|
+ {
|
|
1480
|
+ "Match range without upper bound, unitless tag",
|
|
1481
|
+ "pid=100:",
|
|
1482
|
+ map[string][]int64{"pid": {123}},
|
|
1483
|
+ nil,
|
|
1484
|
+ true,
|
|
1485
|
+ },
|
|
1486
|
+ {
|
|
1487
|
+ "Don't match range without upper bound, unitless tag",
|
|
1488
|
+ "pid=200:",
|
|
1489
|
+ map[string][]int64{"pid": {123}},
|
|
1490
|
+ nil,
|
|
1491
|
+ false,
|
|
1492
|
+ },
|
|
1493
|
+ {
|
|
1494
|
+ "Match range without lower bound, unitless tag",
|
|
1495
|
+ "pid=:200",
|
|
1496
|
+ map[string][]int64{"pid": {123}},
|
|
1497
|
+ nil,
|
|
1498
|
+ true,
|
|
1499
|
+ },
|
|
1500
|
+ {
|
|
1501
|
+ "Don't match range without lower bound, unitless tag",
|
|
1502
|
+ "pid=:100",
|
|
1503
|
+ map[string][]int64{"pid": {123}},
|
|
1504
|
+ nil,
|
|
1505
|
+ false,
|
|
1506
|
+ },
|
1458
|
1507
|
}
|
1459
|
1508
|
for _, test := range tagFilterTests {
|
1460
|
1509
|
t.Run(test.desc, func(t *testing.T) {
|