mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Svc REST: allow tests to set cluster IP families
This commit is contained in:
parent
aea90a2324
commit
7887c4c8fc
@ -5998,13 +5998,18 @@ type cudTestCase struct {
|
||||
}
|
||||
|
||||
func helpTestCreateUpdateDelete(t *testing.T, testCases []cudTestCase) {
|
||||
t.Helper()
|
||||
helpTestCreateUpdateDeleteWithFamilies(t, testCases, []api.IPFamily{api.IPv4Protocol, api.IPv6Protocol})
|
||||
}
|
||||
|
||||
func helpTestCreateUpdateDeleteWithFamilies(t *testing.T, testCases []cudTestCase, ipFamilies []api.IPFamily) {
|
||||
// NOTE: do not call t.Helper() here. It's more useful for errors to be
|
||||
// attributed to lines in this function than the caller of it.
|
||||
|
||||
// This test is ONLY with the gate enabled.
|
||||
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.IPv6DualStack, true)()
|
||||
|
||||
storage, _, server := newStorage(t, []api.IPFamily{api.IPv4Protocol, api.IPv6Protocol})
|
||||
storage, _, server := newStorage(t, ipFamilies)
|
||||
defer server.Terminate(t)
|
||||
defer storage.Store.DestroyFunc()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user