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