mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-09-28 02:44:17 +00:00
Replace more pointer.String() with the new ptr.To()
This commit is contained in:
@@ -31,7 +31,7 @@ import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
||||
"k8s.io/utils/pointer"
|
||||
"k8s.io/utils/ptr"
|
||||
|
||||
authv1alpha "go.pinniped.dev/generated/latest/apis/concierge/authentication/v1alpha1"
|
||||
configv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1"
|
||||
@@ -1283,7 +1283,7 @@ func TestE2EFullIntegration_Browser(t *testing.T) {
|
||||
{
|
||||
DisplayName: ldapIDPDisplayName,
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("idp.supervisor." + env.APIGroupSuffix),
|
||||
APIGroup: ptr.To("idp.supervisor." + env.APIGroupSuffix),
|
||||
Kind: "LDAPIdentityProvider",
|
||||
Name: createdLDAPProvider.Name,
|
||||
},
|
||||
@@ -1320,7 +1320,7 @@ func TestE2EFullIntegration_Browser(t *testing.T) {
|
||||
{
|
||||
DisplayName: oidcIDPDisplayName,
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("idp.supervisor." + env.APIGroupSuffix),
|
||||
APIGroup: ptr.To("idp.supervisor." + env.APIGroupSuffix),
|
||||
Kind: "OIDCIdentityProvider",
|
||||
Name: createdOIDCProvider.Name,
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
k8serrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/client-go/util/retry"
|
||||
"k8s.io/utils/pointer"
|
||||
"k8s.io/utils/ptr"
|
||||
|
||||
"go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1"
|
||||
idpv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/idp/v1alpha1"
|
||||
@@ -104,7 +104,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
||||
{
|
||||
DisplayName: "idp1",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("idp.supervisor." + env.APIGroupSuffix),
|
||||
APIGroup: ptr.To("idp.supervisor." + env.APIGroupSuffix),
|
||||
Kind: "OIDCIdentityProvider",
|
||||
Name: oidcIDP1Meta.Name,
|
||||
},
|
||||
@@ -113,7 +113,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
||||
{
|
||||
DisplayName: "idp2",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("idp.supervisor." + env.APIGroupSuffix),
|
||||
APIGroup: ptr.To("idp.supervisor." + env.APIGroupSuffix),
|
||||
Kind: "OIDCIdentityProvider",
|
||||
Name: oidcIDP2Meta.Name,
|
||||
},
|
||||
@@ -204,7 +204,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
||||
{
|
||||
DisplayName: "not unique",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("this is the wrong api group"),
|
||||
APIGroup: ptr.To("this is the wrong api group"),
|
||||
Kind: "OIDCIdentityProvider",
|
||||
Name: "will not be found",
|
||||
},
|
||||
@@ -228,7 +228,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
||||
{ // this identity provider should be valid
|
||||
DisplayName: "unique",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("idp.supervisor." + env.APIGroupSuffix),
|
||||
APIGroup: ptr.To("idp.supervisor." + env.APIGroupSuffix),
|
||||
Kind: "OIDCIdentityProvider",
|
||||
Name: oidcIdentityProvider.Name,
|
||||
},
|
||||
@@ -236,7 +236,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
||||
{
|
||||
DisplayName: "not unique",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("idp.supervisor." + env.APIGroupSuffix),
|
||||
APIGroup: ptr.To("idp.supervisor." + env.APIGroupSuffix),
|
||||
Kind: "this is the wrong kind",
|
||||
Name: "also will not be found",
|
||||
},
|
||||
@@ -442,7 +442,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
||||
DisplayName: "now made unique",
|
||||
// Fix the objectRef.
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("idp.supervisor." + env.APIGroupSuffix),
|
||||
APIGroup: ptr.To("idp.supervisor." + env.APIGroupSuffix),
|
||||
Kind: "OIDCIdentityProvider",
|
||||
Name: oidcIdentityProvider.Name,
|
||||
},
|
||||
@@ -520,7 +520,7 @@ func TestSupervisorFederationDomainStatus_Disruptive(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
gotFD.Spec.IdentityProviders[2].ObjectRef = corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("idp.supervisor." + env.APIGroupSuffix),
|
||||
APIGroup: ptr.To("idp.supervisor." + env.APIGroupSuffix),
|
||||
Kind: "OIDCIdentityProvider",
|
||||
Name: oidcIdentityProvider.Name,
|
||||
}
|
||||
@@ -597,7 +597,7 @@ func TestSupervisorFederationDomainCRDValidations_Parallel(t *testing.T) {
|
||||
{
|
||||
DisplayName: "",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
APIGroup: ptr.To("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -618,7 +618,7 @@ func TestSupervisorFederationDomainCRDValidations_Parallel(t *testing.T) {
|
||||
{
|
||||
DisplayName: "foo",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
APIGroup: ptr.To("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
},
|
||||
Transforms: v1alpha1.FederationDomainTransforms{
|
||||
Constants: []v1alpha1.FederationDomainTransformsConstant{
|
||||
@@ -647,7 +647,7 @@ func TestSupervisorFederationDomainCRDValidations_Parallel(t *testing.T) {
|
||||
{
|
||||
DisplayName: "foo",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
APIGroup: ptr.To("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
},
|
||||
Transforms: v1alpha1.FederationDomainTransforms{
|
||||
Constants: []v1alpha1.FederationDomainTransformsConstant{
|
||||
@@ -673,7 +673,7 @@ func TestSupervisorFederationDomainCRDValidations_Parallel(t *testing.T) {
|
||||
{
|
||||
DisplayName: "foo",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
APIGroup: ptr.To("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
},
|
||||
Transforms: v1alpha1.FederationDomainTransforms{
|
||||
Constants: []v1alpha1.FederationDomainTransformsConstant{
|
||||
@@ -706,7 +706,7 @@ func TestSupervisorFederationDomainCRDValidations_Parallel(t *testing.T) {
|
||||
{
|
||||
DisplayName: "foo",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
APIGroup: ptr.To("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
},
|
||||
Transforms: v1alpha1.FederationDomainTransforms{
|
||||
Constants: []v1alpha1.FederationDomainTransformsConstant{
|
||||
@@ -748,7 +748,7 @@ func TestSupervisorFederationDomainCRDValidations_Parallel(t *testing.T) {
|
||||
{
|
||||
DisplayName: "foo",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
APIGroup: ptr.To("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
},
|
||||
Transforms: v1alpha1.FederationDomainTransforms{
|
||||
Constants: []v1alpha1.FederationDomainTransformsConstant{
|
||||
@@ -776,7 +776,7 @@ func TestSupervisorFederationDomainCRDValidations_Parallel(t *testing.T) {
|
||||
{
|
||||
DisplayName: "foo",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
APIGroup: ptr.To("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
},
|
||||
Transforms: v1alpha1.FederationDomainTransforms{
|
||||
Expressions: []v1alpha1.FederationDomainTransformsExpression{
|
||||
@@ -805,7 +805,7 @@ func TestSupervisorFederationDomainCRDValidations_Parallel(t *testing.T) {
|
||||
{
|
||||
DisplayName: "foo",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
APIGroup: ptr.To("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
},
|
||||
Transforms: v1alpha1.FederationDomainTransforms{
|
||||
Expressions: []v1alpha1.FederationDomainTransformsExpression{
|
||||
@@ -831,7 +831,7 @@ func TestSupervisorFederationDomainCRDValidations_Parallel(t *testing.T) {
|
||||
{
|
||||
DisplayName: "foo",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
APIGroup: ptr.To("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
},
|
||||
Transforms: v1alpha1.FederationDomainTransforms{
|
||||
Examples: []v1alpha1.FederationDomainTransformsExample{
|
||||
@@ -867,7 +867,7 @@ func TestSupervisorFederationDomainCRDValidations_Parallel(t *testing.T) {
|
||||
{
|
||||
DisplayName: "foo",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
APIGroup: ptr.To("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -884,7 +884,7 @@ func TestSupervisorFederationDomainCRDValidations_Parallel(t *testing.T) {
|
||||
{
|
||||
DisplayName: "foo",
|
||||
ObjectRef: corev1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
APIGroup: ptr.To("required in older versions of Kubernetes for each item in the identityProviders slice"),
|
||||
},
|
||||
Transforms: v1alpha1.FederationDomainTransforms{
|
||||
Constants: []v1alpha1.FederationDomainTransformsConstant{
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
"golang.org/x/oauth2"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/utils/pointer"
|
||||
"k8s.io/utils/ptr"
|
||||
"k8s.io/utils/strings/slices"
|
||||
|
||||
configv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1"
|
||||
@@ -1870,7 +1870,7 @@ func TestSupervisorLogin_Browser(t *testing.T) {
|
||||
{
|
||||
DisplayName: displayName,
|
||||
ObjectRef: v1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("idp.supervisor." + env.APIGroupSuffix),
|
||||
APIGroup: ptr.To("idp.supervisor." + env.APIGroupSuffix),
|
||||
Kind: "OIDCIdentityProvider",
|
||||
Name: idpName,
|
||||
},
|
||||
@@ -1927,7 +1927,7 @@ func TestSupervisorLogin_Browser(t *testing.T) {
|
||||
{
|
||||
DisplayName: displayName,
|
||||
ObjectRef: v1.TypedLocalObjectReference{
|
||||
APIGroup: pointer.String("idp.supervisor." + env.APIGroupSuffix),
|
||||
APIGroup: ptr.To("idp.supervisor." + env.APIGroupSuffix),
|
||||
Kind: "LDAPIdentityProvider",
|
||||
Name: idpName,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user