Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <noreply@github.com>
  • Loading branch information
xuezhaojun authored Jul 8, 2024
1 parent e3ccb92 commit b6d95bd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/integration/registration/spokecluster_autoapproval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,12 @@ var _ = ginkgo.Describe("Cluster Auto Approval", func() {
}, eventuallyTimeout, eventuallyInterval).Should(gomega.Succeed())

// we can deny the cluster after it is accepted
cluster, err := util.GetManagedCluster(clusterClient, clusterName)
gomega.Expect(err).NotTo(gomega.HaveOccurred())

updatedCluster := cluster.DeepCopy()
updatedCluster.Spec.HubAcceptsClient = false

gomega.Eventually(func() error {
cluster, err := util.GetManagedCluster(clusterClient, clusterName)
gomega.Expect(err).NotTo(gomega.HaveOccurred())

updatedCluster := cluster.DeepCopy()
updatedCluster.Spec.HubAcceptsClient = false
_, err = clusterClient.ClusterV1().ManagedClusters().Update(context.TODO(), updatedCluster, v1.UpdateOptions{})
return err
}, eventuallyTimeout, eventuallyInterval).Should(gomega.Succeed())
Expand Down

0 comments on commit b6d95bd

Please sign in to comment.