@@ -39,14 +39,14 @@ func TestPrimaryPreferred_with_options(t *testing.T) {
39
39
require := require .New (t )
40
40
subject := PrimaryPreferred (
41
41
WithMaxStaleness (time .Duration (10 )),
42
- WithTags ("a" , "1" ),
42
+ WithTags ("a" , "1" , "b" , "2" ),
43
43
)
44
44
45
45
require .Equal (PrimaryPreferredMode , subject .Mode ())
46
46
ms , set := subject .MaxStaleness ()
47
47
require .True (set )
48
48
require .Equal (time .Duration (10 ), ms )
49
- require .Equal ([]tag.Set {{tag.Tag {Name : "a" , Value : "1" }}}, subject .TagSets ())
49
+ require .Equal ([]tag.Set {{tag.Tag {Name : "a" , Value : "1" },tag. Tag { Name : "b" , Value : "2" } }}, subject .TagSets ())
50
50
}
51
51
52
52
func TestSecondaryPreferred (t * testing.T ) {
@@ -63,14 +63,14 @@ func TestSecondaryPreferred_with_options(t *testing.T) {
63
63
require := require .New (t )
64
64
subject := SecondaryPreferred (
65
65
WithMaxStaleness (time .Duration (10 )),
66
- WithTags ("a" , "1" ),
66
+ WithTags ("a" , "1" , "b" , "2" ),
67
67
)
68
68
69
69
require .Equal (SecondaryPreferredMode , subject .Mode ())
70
70
ms , set := subject .MaxStaleness ()
71
71
require .True (set )
72
72
require .Equal (time .Duration (10 ), ms )
73
- require .Equal ([]tag.Set {{tag.Tag {Name : "a" , Value : "1" }}}, subject .TagSets ())
73
+ require .Equal ([]tag.Set {{tag.Tag {Name : "a" , Value : "1" },tag. Tag { Name : "b" , Value : "2" } }}, subject .TagSets ())
74
74
}
75
75
76
76
func TestSecondary (t * testing.T ) {
@@ -87,14 +87,14 @@ func TestSecondary_with_options(t *testing.T) {
87
87
require := require .New (t )
88
88
subject := Secondary (
89
89
WithMaxStaleness (time .Duration (10 )),
90
- WithTags ("a" , "1" ),
90
+ WithTags ("a" , "1" , "b" , "2" ),
91
91
)
92
92
93
93
require .Equal (SecondaryMode , subject .Mode ())
94
94
ms , set := subject .MaxStaleness ()
95
95
require .True (set )
96
96
require .Equal (time .Duration (10 ), ms )
97
- require .Equal ([]tag.Set {{tag.Tag {Name : "a" , Value : "1" }}}, subject .TagSets ())
97
+ require .Equal ([]tag.Set {{tag.Tag {Name : "a" , Value : "1" },tag. Tag { Name : "b" , Value : "2" } }}, subject .TagSets ())
98
98
}
99
99
100
100
func TestNearest (t * testing.T ) {
@@ -111,12 +111,12 @@ func TestNearest_with_options(t *testing.T) {
111
111
require := require .New (t )
112
112
subject := Nearest (
113
113
WithMaxStaleness (time .Duration (10 )),
114
- WithTags ("a" , "1" ),
114
+ WithTags ("a" , "1" , "b" , "2" ),
115
115
)
116
116
117
117
require .Equal (NearestMode , subject .Mode ())
118
118
ms , set := subject .MaxStaleness ()
119
119
require .True (set )
120
120
require .Equal (time .Duration (10 ), ms )
121
- require .Equal ([]tag.Set {{tag.Tag {Name : "a" , Value : "1" }}}, subject .TagSets ())
121
+ require .Equal ([]tag.Set {{tag.Tag {Name : "a" , Value : "1" },tag. Tag { Name : "b" , Value : "2" } }}, subject .TagSets ())
122
122
}
0 commit comments