Skip to content

Commit

Permalink
adapt linodecluster controller tests to new mocktest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
amold1 committed Apr 23, 2024
1 parent 877f768 commit b340071
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 215 deletions.
4 changes: 2 additions & 2 deletions cloud/scope/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func NewClusterScope(ctx context.Context, apiKey string, params ClusterScopePara
}

return &ClusterScope{
client: params.Client,
Client: params.Client,
Cluster: params.Cluster,
LinodeClient: linodeClient,
LinodeCluster: params.LinodeCluster,
Expand All @@ -82,7 +82,7 @@ func NewClusterScope(ctx context.Context, apiKey string, params ClusterScopePara

// ClusterScope defines the basic context for an actuator to operate upon.
type ClusterScope struct {
client K8sClient
Client K8sClient
PatchHelper *patch.Helper
LinodeClient LinodeNodeBalancerClient
Cluster *clusterv1.Cluster
Expand Down
1 change: 1 addition & 0 deletions controller/linodecluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ func (r *LinodeClusterReconciler) reconcileDelete(ctx context.Context, logger lo
if clusterScope.LinodeCluster.Spec.Network.NodeBalancerID == nil {
logger.Info("NodeBalancer ID is missing, nothing to do")
controllerutil.RemoveFinalizer(clusterScope.LinodeCluster, infrav1alpha1.GroupVersion.String())
r.Recorder.Event(clusterScope.LinodeCluster, corev1.EventTypeWarning, "NodeBalancerIDMissing", "NodeBalancer ID is missing, nothing to do")

return nil
}
Expand Down
Loading

0 comments on commit b340071

Please sign in to comment.