Rename IPFamilyPolicyType => IPFamilyPolicy

This commit is contained in:
Tim Hockin
2021-11-09 23:09:35 -08:00
parent 65361245ed
commit 55232e2ef7
13 changed files with 933 additions and 928 deletions

View File

@@ -1012,7 +1012,7 @@ func isMatchingPreferDualStackClusterIPFields(after After, before Before) bool {
// Helper to avoid nil-checks all over. Callers of this need to be checking
// for an exact value.
func getIPFamilyPolicy(svc *api.Service) api.IPFamilyPolicyType {
func getIPFamilyPolicy(svc *api.Service) api.IPFamilyPolicy {
if svc.Spec.IPFamilyPolicy == nil {
return "" // callers need to handle this
}

View File

@@ -1239,7 +1239,7 @@ func proveHealthCheckNodePortDeallocated(t *testing.T, storage *wrapperRESTForTe
// functional tests of the registry
//
func fmtIPFamilyPolicy(pol *api.IPFamilyPolicyType) string {
func fmtIPFamilyPolicy(pol *api.IPFamilyPolicy) string {
if pol == nil {
return "<nil>"
}
@@ -1453,7 +1453,7 @@ func TestCreateInitIPFields(t *testing.T) {
line string
svc *api.Service
expectError bool
expectPolicy api.IPFamilyPolicyType
expectPolicy api.IPFamilyPolicy
expectFamilies []api.IPFamily
expectHeadless bool
}
@@ -5922,7 +5922,7 @@ func TestCreateInvalidClusterIPInputs(t *testing.T) {
name: "bad_ipFamilyPolicy",
families: []api.IPFamily{api.IPv4Protocol},
svc: svctest.MakeService("foo",
svctest.SetIPFamilyPolicy(api.IPFamilyPolicyType("garbage"))),
svctest.SetIPFamilyPolicy(api.IPFamilyPolicy("garbage"))),
expect: []string{"Unsupported value"},
}, {
name: "requiredual_ipFamilyPolicy_on_singlestack",