Skip to content

Commit cd8f2e6

Browse files
committed
add label to linode vpc to prevent clash in uppdate
1 parent ccc920f commit cd8f2e6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

internal/controller/linodecluster_controller_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ var _ = Describe("cluster-lifecycle", Ordered, Label("cluster", "cluster-lifecyc
7272
ObjectMeta: metav1.ObjectMeta{
7373
Name: "vpctest",
7474
Namespace: defaultNamespace,
75+
Labels: map[string]string{
76+
clusterv1.ClusterNameLabel: linodeCluster.ObjectMeta.Name,
77+
},
7578
},
7679
Spec: infrav1alpha2.LinodeVPCSpec{
7780
Region: "us-ord",
@@ -181,11 +184,7 @@ var _ = Describe("cluster-lifecycle", Ordered, Label("cluster", "cluster-lifecyc
181184
cScope.LinodeClient = mck.LinodeClient
182185
// Set VPC as ready
183186
linodeVPC.Status.Ready = true
184-
linodeVPC.Labels = map[string]string{
185-
clusterv1.ClusterNameLabel: cScope.LinodeCluster.Name,
186-
}
187187
Expect(k8sClient.Status().Update(ctx, &linodeVPC)).To(Succeed())
188-
Expect(k8sClient.Update(ctx, &linodeVPC)).To(Succeed())
189188

190189
// Create and mark firewall as ready if using firewall ref
191190
if cScope.LinodeCluster.Spec.NodeBalancerFirewallRef != nil {

0 commit comments

Comments
 (0)