@@ -114,6 +114,21 @@ var _ = Describe("cluster-lifecycle", Ordered, Label("cluster", "cluster-lifecyc
114114
115115 ctlrSuite .Run (
116116 OneOf (
117+ Path (
118+ Call ("vpc present but not ready" , func (ctx context.Context , mck Mock ) {
119+ Expect (k8sClient .Create (ctx , & linodeVPC )).To (Succeed ())
120+ linodeVPC .Status .Ready = false
121+ k8sClient .Status ().Update (ctx , & linodeVPC )
122+ }),
123+ OneOf (
124+ Path (Result ("" , func (ctx context.Context , mck Mock ) {
125+ reconciler .Client = k8sClient
126+ _ , err := reconciler .reconcile (ctx , cScope , mck .Logger ())
127+ Expect (err ).NotTo (HaveOccurred ())
128+ Expect (rec .ConditionTrue (& linodeCluster , ConditionPreflightLinodeVPCReady )).To (BeFalse ())
129+ })),
130+ ),
131+ ),
117132 Path (
118133 Call ("firewall doesn't exist" , func (ctx context.Context , mck Mock ) {
119134 cScope .LinodeCluster .Spec .NodeBalancerFirewallRef = & corev1.ObjectReference {Name : "firewalltest" }
@@ -151,21 +166,6 @@ var _ = Describe("cluster-lifecycle", Ordered, Label("cluster", "cluster-lifecyc
151166 })),
152167 ),
153168 ),
154- Path (
155- Call ("vpc present but not ready" , func (ctx context.Context , mck Mock ) {
156- Expect (k8sClient .Create (ctx , & linodeVPC )).To (Succeed ())
157- linodeVPC .Status .Ready = false
158- k8sClient .Status ().Update (ctx , & linodeVPC )
159- }),
160- OneOf (
161- Path (Result ("" , func (ctx context.Context , mck Mock ) {
162- reconciler .Client = k8sClient
163- _ , err := reconciler .reconcile (ctx , cScope , mck .Logger ())
164- Expect (err ).NotTo (HaveOccurred ())
165- Expect (rec .ConditionTrue (& linodeCluster , ConditionPreflightLinodeVPCReady )).To (BeFalse ())
166- })),
167- ),
168- ),
169169 Path (
170170 Call ("cluster is not created because there was an error creating nb" , func (ctx context.Context , mck Mock ) {
171171 cScope .LinodeClient = mck .LinodeClient
0 commit comments