diff --git a/test/integration/server_test.go b/test/integration/server_test.go index fd47c5a6..b5a429c9 100644 --- a/test/integration/server_test.go +++ b/test/integration/server_test.go @@ -20,10 +20,8 @@ import ( "testing" "github.com/kubernetes-sigs/kubebuilder/pkg/test" - "k8s.io/api/core/v1" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" crclientset "k8s.io/cluster-registry/pkg/client/clientset/versioned" ) @@ -102,11 +100,10 @@ func testClusterUpdate(t *testing.T, clientset *crclientset.Clientset, clusterNa authSecretName := "authSecret" cluster.Spec.AuthInfo = v1alpha1.AuthInfo{ - ControllerAuthInfo: &v1.ObjectReference{ + Controller: &v1alpha1.ObjectReference{ Kind: "Secret", Name: authSecretName, Namespace: "default", - UID: types.UID("testUID"), }, } @@ -118,9 +115,9 @@ func testClusterUpdate(t *testing.T, clientset *crclientset.Clientset, clusterNa t.Fatalf("Expected a cluster, got nil") } else if cluster.Name != clusterName { t.Fatalf("Expected a cluster named 'cluster', got a cluster named '%v'.", cluster.Name) - } else if cluster.Spec.AuthInfo.ControllerAuthInfo == nil || cluster.Spec.AuthInfo.ControllerAuthInfo.Name != authSecretName { + } else if cluster.Spec.AuthInfo.Controller == nil || cluster.Spec.AuthInfo.Controller.Name != authSecretName { t.Fatalf("Expected a cluster controller auth info named '%v', got cluster auth provider '%v'", - authSecretName, cluster.Spec.AuthInfo.ControllerAuthInfo) + authSecretName, cluster.Spec.AuthInfo.Controller) } }