@@ -177,45 +177,35 @@ func TestListPaging(t *testing.T) {
177
177
}
178
178
179
179
func TestList (t * testing.T ) {
180
- featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , false )
181
- ctx , cacher , server , terminate := testSetupWithEtcdServer (t )
182
- t .Cleanup (terminate )
183
- storagetesting .RunTestList (ctx , t , cacher , compactStorage (cacher , server .V3Client .Client ), true )
184
- }
185
-
186
- func TestListWithConsistentListFromCache (t * testing.T ) {
187
- featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , true )
188
- ctx , cacher , server , terminate := testSetupWithEtcdServer (t )
189
- t .Cleanup (terminate )
190
- storagetesting .RunTestList (ctx , t , cacher , compactStorage (cacher , server .V3Client .Client ), true )
180
+ for _ , consistentRead := range []bool {true , false } {
181
+ t .Run (fmt .Sprintf ("ConsistentListFromCache=%v" , consistentRead ), func (t * testing.T ) {
182
+ featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , consistentRead )
183
+ ctx , cacher , server , terminate := testSetupWithEtcdServer (t )
184
+ t .Cleanup (terminate )
185
+ storagetesting .RunTestList (ctx , t , cacher , compactStorage (cacher , server .V3Client .Client ), true )
186
+ })
187
+ }
191
188
}
192
-
193
189
func TestConsistentList (t * testing.T ) {
194
- featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , false )
195
- ctx , cacher , server , terminate := testSetupWithEtcdServer (t )
196
- t .Cleanup (terminate )
197
- storagetesting .RunTestConsistentList (ctx , t , cacher , compactStorage (cacher , server .V3Client .Client ), true , false )
198
- }
199
-
200
- func TestConsistentListWithConsistentListFromCache (t * testing.T ) {
201
- featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , true )
202
- ctx , cacher , server , terminate := testSetupWithEtcdServer (t )
203
- t .Cleanup (terminate )
204
- storagetesting .RunTestConsistentList (ctx , t , cacher , compactStorage (cacher , server .V3Client .Client ), true , true )
190
+ for _ , consistentRead := range []bool {true , false } {
191
+ t .Run (fmt .Sprintf ("ConsistentListFromCache=%v" , consistentRead ), func (t * testing.T ) {
192
+ featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , consistentRead )
193
+ ctx , cacher , server , terminate := testSetupWithEtcdServer (t )
194
+ t .Cleanup (terminate )
195
+ storagetesting .RunTestConsistentList (ctx , t , cacher , compactStorage (cacher , server .V3Client .Client ), true , consistentRead )
196
+ })
197
+ }
205
198
}
206
199
207
200
func TestGetListNonRecursive (t * testing.T ) {
208
- featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , false )
209
- ctx , cacher , server , terminate := testSetupWithEtcdServer (t )
210
- t .Cleanup (terminate )
211
- storagetesting .RunTestGetListNonRecursive (ctx , t , compactStorage (cacher , server .V3Client .Client ), cacher )
212
- }
213
-
214
- func TestGetListNonRecursiveWithConsistentListFromCache (t * testing.T ) {
215
- featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , true )
216
- ctx , cacher , server , terminate := testSetupWithEtcdServer (t )
217
- t .Cleanup (terminate )
218
- storagetesting .RunTestGetListNonRecursive (ctx , t , compactStorage (cacher , server .V3Client .Client ), cacher )
201
+ for _ , consistentRead := range []bool {true , false } {
202
+ t .Run (fmt .Sprintf ("ConsistentListFromCache=%v" , consistentRead ), func (t * testing.T ) {
203
+ featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , consistentRead )
204
+ ctx , cacher , server , terminate := testSetupWithEtcdServer (t )
205
+ t .Cleanup (terminate )
206
+ storagetesting .RunTestGetListNonRecursive (ctx , t , compactStorage (cacher , server .V3Client .Client ), cacher )
207
+ })
208
+ }
219
209
}
220
210
221
211
func TestGetListRecursivePrefix (t * testing.T ) {
0 commit comments