Skip to content

Commit

Permalink
rename e2e function name WaitXXXFitWith to WaitXXXReady
Browse files Browse the repository at this point in the history
Signed-off-by: LiZhenCheng9527 <[email protected]>
  • Loading branch information
LiZhenCheng9527 committed Feb 22, 2024
1 parent d5dd986 commit 52f3dc3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion e2e/fleet_attachedcluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var _ = ginkgo.Describe("[AttachedClusters] AttachedClusters testing", func() {
// create fleet and checkout fleet status
fleetCreateErr := resources.CreateFleet(kuratorClient, fleet)
gomega.Expect(fleetCreateErr).ShouldNot(gomega.HaveOccurred())
resources.WaitFleetFitWith(kuratorClient, fleetNamespace, fleetname, func(fleet *fleetv1a1.Fleet) bool {
resources.WaitFleetReady(kuratorClient, fleetNamespace, fleetname, func(fleet *fleetv1a1.Fleet) bool {
return fleet.Status.Phase == fleetv1a1.ReadyPhase
})
})
Expand Down
2 changes: 1 addition & 1 deletion e2e/resources/attachedcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func RemoveAttachedCluster(client kurator.Interface, namespace, name string) err
}

// WaitAttachedClusterFitWith wait attachedCluster sync with fit func.
func WaitAttachedClusterFitWith(client kurator.Interface, namespace, name string, fit func(attachedCluster *clusterv1a1.AttachedCluster) bool) {
func WaitAttachedClusterReady(client kurator.Interface, namespace, name string, fit func(attachedCluster *clusterv1a1.AttachedCluster) bool) {
gomega.Eventually(func() bool {
attachedClusterPresentOnCluster, err := client.ClusterV1alpha1().AttachedClusters(namespace).Get(context.TODO(), name, metav1.GetOptions{})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion e2e/resources/fleet.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func RemoveFleet(client kurator.Interface, namespace, name string) error {
}

// WaitAttachedClusterFitWith wait fleet sync with fit func.
func WaitFleetFitWith(client kurator.Interface, namespace, name string, fit func(fleeet *fleetv1a1.Fleet) bool) {
func WaitFleetReady(client kurator.Interface, namespace, name string, fit func(fleeet *fleetv1a1.Fleet) bool) {
gomega.Eventually(func() bool {
fleetPresentOnCluster, err := client.FleetV1alpha1().Fleets(namespace).Get(context.TODO(), name, metav1.GetOptions{})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte {

attachedCreateErr := resources.CreateAttachedCluster(kuratorClient, attachedcluster)
gomega.Expect(attachedCreateErr).ShouldNot(gomega.HaveOccurred())
resources.WaitAttachedClusterFitWith(kuratorClient, namespace, memberClusterName, func(attachedCluster *clusterv1a1.AttachedCluster) bool {
resources.WaitAttachedClusterReady(kuratorClient, namespace, memberClusterName, func(attachedCluster *clusterv1a1.AttachedCluster) bool {
return attachedCluster.Status.Ready
})
})

0 comments on commit 52f3dc3

Please sign in to comment.