Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/operator/controllers/subnets/subnet_nsg.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ func (r *reconcileManager) updateReconcileSubnetAnnotation(ctx context.Context)
Annotations: cluster.Annotations,
},
}
payloadBytes, _ := json.Marshal(patchPayload)
payloadBytes, err := json.Marshal(patchPayload)
if err != nil {
return err
}
return r.client.Patch(ctx, cluster, client.RawPatch(types.MergePatchType, payloadBytes))
})
}
4 changes: 2 additions & 2 deletions test/e2e/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ var _ = Describe("ARO Operator - Azure Subnet Reconciler", func() {
By("checking that the cluster document annotations have been patched")
Eventually(func(g Gomega, ctx context.Context) {
co, err := clients.AROClusters.AroV1alpha1().Clusters().Get(ctx, "cluster", metav1.GetOptions{})
Expect(err).NotTo(HaveOccurred())
Expect(co.Annotations).To(Satisfy(subnetReconciliationAnnotationExists))
g.Expect(err).NotTo(HaveOccurred())
g.Expect(co.Annotations).To(Satisfy(subnetReconciliationAnnotationExists))
// Using 2 seconds because the cluster doc should be patched very quickly after the subnet itself is patched.
// The small eventually avoids any unfortunate timing
}).WithContext(ctx).WithTimeout(time.Second * 2).Should(Succeed())
Expand Down
Loading