@@ -31,7 +31,7 @@ func Test_PolicyStreamMapping_PolicyFor(t *testing.T) {
31
31
"policy3" : []* PriorityStream {
32
32
{
33
33
Selector : `{qyx="qzx", qox="qox"}` ,
34
- Priority : 1 ,
34
+ Priority : 2 ,
35
35
Matchers : []* labels.Matcher {
36
36
labels .MustNewMatcher (labels .MatchEqual , "qyx" , "qzx" ),
37
37
labels .MustNewMatcher (labels .MatchEqual , "qox" , "qox" ),
@@ -51,7 +51,7 @@ func Test_PolicyStreamMapping_PolicyFor(t *testing.T) {
51
51
"policy5" : []* PriorityStream {
52
52
{
53
53
Selector : `{qab=~"qzx.*"}` ,
54
- Priority : 1 ,
54
+ Priority : 2 ,
55
55
Matchers : []* labels.Matcher {
56
56
labels .MustNewMatcher (labels .MatchRegexp , "qab" , "qzx.*" ),
57
57
},
@@ -94,7 +94,7 @@ func Test_PolicyStreamMapping_PolicyFor(t *testing.T) {
94
94
require .Equal (t , "policy1" , mapping .PolicyFor (labels .FromStrings ("foo" , "bar" )))
95
95
// matches both policy2 and policy1 but policy1 has higher priority.
96
96
require .Equal (t , "policy1" , mapping .PolicyFor (labels .FromStrings ("foo" , "bar" , "daz" , "baz" )))
97
- // matches policy3 and policy4 but policy3 appears first .
97
+ // matches policy3 and policy4 but policy3 has higher priority. .
98
98
require .Equal (t , "policy3" , mapping .PolicyFor (labels .FromStrings ("qyx" , "qzx" , "qox" , "qox" )))
99
99
// matches no policy.
100
100
require .Equal (t , "" , mapping .PolicyFor (labels .FromStrings ("foo" , "fooz" , "daz" , "qux" , "quux" , "corge" )))
0 commit comments