@@ -33,7 +33,7 @@ func Test_ConfigRuleStoreError(t *testing.T) {
33
33
}
34
34
35
35
store := NewConfigRuleStore (mock )
36
- _ , err := store .ListAllRuleGroups (nil )
36
+ _ , err := store .ListAllRuleGroups (context . Background () )
37
37
38
38
assert .Equal (t , mock .err , err , "Unexpected error returned" )
39
39
}
@@ -52,7 +52,7 @@ func Test_ConfigRuleStoreReturn(t *testing.T) {
52
52
}
53
53
54
54
store := NewConfigRuleStore (mock )
55
- rules , _ := store .ListAllRuleGroups (nil )
55
+ rules , _ := store .ListAllRuleGroups (context . Background () )
56
56
57
57
assert .Equal (t , 1 , len (rules ["user" ]))
58
58
assert .Equal (t , id , store .since )
@@ -71,15 +71,15 @@ func Test_ConfigRuleStoreDelete(t *testing.T) {
71
71
}
72
72
73
73
store := NewConfigRuleStore (mock )
74
- store .ListAllRuleGroups (nil )
74
+ _ , _ = store .ListAllRuleGroups (context . Background () )
75
75
76
76
mock .cfgs ["user" ] = configs.VersionedRulesConfig {
77
77
ID : 1 ,
78
78
Config : configs.RulesConfig {},
79
79
DeletedAt : time .Unix (0 , 1 ),
80
80
}
81
81
82
- rules , _ := store .ListAllRuleGroups (nil )
82
+ rules , _ := store .ListAllRuleGroups (context . Background () )
83
83
84
84
assert .Equal (t , 0 , len (rules ["user" ]))
85
85
}
@@ -97,7 +97,7 @@ func Test_ConfigRuleStoreAppend(t *testing.T) {
97
97
}
98
98
99
99
store := NewConfigRuleStore (mock )
100
- store .ListAllRuleGroups (nil )
100
+ _ , _ = store .ListAllRuleGroups (context . Background () )
101
101
102
102
delete (mock .cfgs , "user" )
103
103
mock .cfgs ["user2" ] = configs.VersionedRulesConfig {
@@ -106,7 +106,7 @@ func Test_ConfigRuleStoreAppend(t *testing.T) {
106
106
DeletedAt : zeroTime ,
107
107
}
108
108
109
- rules , _ := store .ListAllRuleGroups (nil )
109
+ rules , _ := store .ListAllRuleGroups (context . Background () )
110
110
111
111
assert .Equal (t , 2 , len (rules ))
112
112
}
@@ -134,7 +134,7 @@ func Test_ConfigRuleStoreSinceSet(t *testing.T) {
134
134
}
135
135
136
136
store := NewConfigRuleStore (mock )
137
- store .ListAllRuleGroups (nil )
137
+ _ , _ = store .ListAllRuleGroups (context . Background () )
138
138
assert .Equal (t , configs .ID (100 ), store .since )
139
139
140
140
delete (mock .cfgs , "user" )
@@ -145,7 +145,7 @@ func Test_ConfigRuleStoreSinceSet(t *testing.T) {
145
145
DeletedAt : zeroTime ,
146
146
}
147
147
148
- store .ListAllRuleGroups (nil )
148
+ _ , _ = store .ListAllRuleGroups (context . Background () )
149
149
assert .Equal (t , configs .ID (100 ), store .since )
150
150
151
151
mock .cfgs ["user2" ] = configs.VersionedRulesConfig {
@@ -154,7 +154,7 @@ func Test_ConfigRuleStoreSinceSet(t *testing.T) {
154
154
DeletedAt : zeroTime ,
155
155
}
156
156
157
- store .ListAllRuleGroups (nil )
157
+ _ , _ = store .ListAllRuleGroups (context . Background () )
158
158
assert .Equal (t , configs .ID (101 ), store .since )
159
159
}
160
160
0 commit comments