Skip to content

Commit

Permalink
adapt linodecluster controller tests to new mocktest changes (#277)
Browse files Browse the repository at this point in the history
* adapt linodecluster controller tests to new mocktest changes
  • Loading branch information
amold1 authored Apr 26, 2024
1 parent b44a6d4 commit 30d4e89
Show file tree
Hide file tree
Showing 3 changed files with 190 additions and 214 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 30d4e89

Please sign in to comment.