Skip to content

Commit b340071

Browse files
committed
adapt linodecluster controller tests to new mocktest changes
1 parent 877f768 commit b340071

File tree

3 files changed

+154
-215
lines changed

3 files changed

+154
-215
lines changed

cloud/scope/cluster.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func NewClusterScope(ctx context.Context, apiKey string, params ClusterScopePara
7272
}
7373

7474
return &ClusterScope{
75-
client: params.Client,
75+
Client: params.Client,
7676
Cluster: params.Cluster,
7777
LinodeClient: linodeClient,
7878
LinodeCluster: params.LinodeCluster,
@@ -82,7 +82,7 @@ func NewClusterScope(ctx context.Context, apiKey string, params ClusterScopePara
8282

8383
// ClusterScope defines the basic context for an actuator to operate upon.
8484
type ClusterScope struct {
85-
client K8sClient
85+
Client K8sClient
8686
PatchHelper *patch.Helper
8787
LinodeClient LinodeNodeBalancerClient
8888
Cluster *clusterv1.Cluster

controller/linodecluster_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ func (r *LinodeClusterReconciler) reconcileDelete(ctx context.Context, logger lo
192192
if clusterScope.LinodeCluster.Spec.Network.NodeBalancerID == nil {
193193
logger.Info("NodeBalancer ID is missing, nothing to do")
194194
controllerutil.RemoveFinalizer(clusterScope.LinodeCluster, infrav1alpha1.GroupVersion.String())
195+
r.Recorder.Event(clusterScope.LinodeCluster, corev1.EventTypeWarning, "NodeBalancerIDMissing", "NodeBalancer ID is missing, nothing to do")
195196

196197
return nil
197198
}

0 commit comments

Comments
 (0)