Split subfunction to allow adding more subtests

This commit is contained in:
Marek Siarkowicz 2025-03-07 11:08:00 +01:00
parent e2a77c2a05
commit 414bfc707f

View File

@ -389,6 +389,12 @@ func TestListOptions(t *testing.T) {
for _, watchCacheEnabled := range []bool{true, false} {
t.Run(fmt.Sprintf("watchCacheEnabled=%t", watchCacheEnabled), func(t *testing.T) {
testListOptions(t, watchCacheEnabled)
})
}
}
func testListOptions(t *testing.T, watchCacheEnabled bool) {
tCtx := ktesting.Init(t)
prefix := path.Join("/", guuid.New().String(), "registry")
etcdConfig := storagebackend.Config{
@ -514,8 +520,6 @@ func TestListOptions(t *testing.T) {
}
}
}
})
}
}
func testListOptionsCase(t *testing.T, rsClient appsv1.ReplicaSetInterface, watchCacheEnabled bool, opts metav1.ListOptions, compactedRv string) {