@@ -135,7 +135,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
135
135
manifests , err := fullRun .Run (nil )
136
136
Expect (err ).ToNot (HaveOccurred ())
137
137
fullChartInstall , err := os .ReadFile (filepath .Join (customManifestsFolder , "full-chart-install.yaml" ))
138
- Expect (manifests ).To (MatchYAML (string (fullChartInstall )))
138
+ Expect (manifests ).To (Equal (string (fullChartInstall )))
139
139
})
140
140
141
141
It ("should not deploy providers when none specified" , func () {
@@ -158,7 +158,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
158
158
Expect (manifests ).ToNot (BeEmpty ())
159
159
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "all-providers-custom-ns-versions.yaml" ))
160
160
Expect (err ).ToNot (HaveOccurred ())
161
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
161
+ Expect (manifests ).To (Equal (string (expectedManifests )))
162
162
})
163
163
164
164
It ("should deploy all providers with custom versions" , func () {
@@ -175,7 +175,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
175
175
Expect (manifests ).ToNot (BeEmpty ())
176
176
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "all-providers-custom-versions.yaml" ))
177
177
Expect (err ).ToNot (HaveOccurred ())
178
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
178
+ Expect (manifests ).To (Equal (string (expectedManifests )))
179
179
})
180
180
181
181
It ("should deploy all providers with latest version" , func () {
@@ -192,7 +192,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
192
192
Expect (manifests ).ToNot (BeEmpty ())
193
193
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "all-providers-latest-versions.yaml" ))
194
194
Expect (err ).ToNot (HaveOccurred ())
195
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
195
+ Expect (manifests ).To (Equal (string (expectedManifests )))
196
196
})
197
197
198
198
It ("should deploy core, bootstrap, control plane when only infra is specified" , func () {
@@ -205,7 +205,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
205
205
Expect (manifests ).ToNot (BeEmpty ())
206
206
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "only-infra.yaml" ))
207
207
Expect (err ).ToNot (HaveOccurred ())
208
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
208
+ Expect (manifests ).To (Equal (string (expectedManifests )))
209
209
})
210
210
211
211
It ("should deploy core when only bootstrap is specified" , func () {
@@ -218,7 +218,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
218
218
Expect (manifests ).ToNot (BeEmpty ())
219
219
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "only-bootstrap.yaml" ))
220
220
Expect (err ).ToNot (HaveOccurred ())
221
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
221
+ Expect (manifests ).To (Equal (string (expectedManifests )))
222
222
})
223
223
224
224
It ("should deploy core when only control plane is specified" , func () {
@@ -231,7 +231,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
231
231
Expect (manifests ).ToNot (BeEmpty ())
232
232
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "only-control-plane.yaml" ))
233
233
Expect (err ).ToNot (HaveOccurred ())
234
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
234
+ Expect (manifests ).To (Equal (string (expectedManifests )))
235
235
})
236
236
237
237
It ("should deploy multiple infra providers with custom namespace and versions" , func () {
@@ -244,7 +244,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
244
244
Expect (manifests ).ToNot (BeEmpty ())
245
245
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "multiple-infra-custom-ns-versions.yaml" ))
246
246
Expect (err ).ToNot (HaveOccurred ())
247
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
247
+ Expect (manifests ).To (Equal (string (expectedManifests )))
248
248
})
249
249
250
250
It ("should deploy multiple control plane providers with custom namespace and versions" , func () {
@@ -257,7 +257,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
257
257
Expect (manifests ).ToNot (BeEmpty ())
258
258
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "multiple-control-plane-custom-ns-versions.yaml" ))
259
259
Expect (err ).ToNot (HaveOccurred ())
260
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
260
+ Expect (manifests ).To (Equal (string (expectedManifests )))
261
261
})
262
262
263
263
It ("should deploy multiple bootstrap providers with custom namespace and versions" , func () {
@@ -270,7 +270,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
270
270
Expect (manifests ).ToNot (BeEmpty ())
271
271
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "multiple-bootstrap-custom-ns-versions.yaml" ))
272
272
Expect (err ).ToNot (HaveOccurred ())
273
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
273
+ Expect (manifests ).To (Equal (string (expectedManifests )))
274
274
})
275
275
276
276
It ("should deploy core when only addon is specified" , func () {
@@ -283,7 +283,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
283
283
Expect (manifests ).ToNot (BeEmpty ())
284
284
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "only-addon.yaml" ))
285
285
Expect (err ).ToNot (HaveOccurred ())
286
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
286
+ Expect (manifests ).To (Equal (string (expectedManifests )))
287
287
})
288
288
289
289
It ("should deploy core, bootstrap, control plane when only infra and addon is specified" , func () {
@@ -297,7 +297,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
297
297
Expect (manifests ).ToNot (BeEmpty ())
298
298
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "only-infra-and-addon.yaml" ))
299
299
Expect (err ).ToNot (HaveOccurred ())
300
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
300
+ Expect (manifests ).To (Equal (string (expectedManifests )))
301
301
})
302
302
It ("should deploy core and infra with feature gates enabled" , func () {
303
303
manifests , err := helmChart .Run (map [string ]string {
@@ -320,23 +320,23 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
320
320
Expect (manifests ).ToNot (BeEmpty ())
321
321
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "feature-gates.yaml" ))
322
322
Expect (err ).ToNot (HaveOccurred ())
323
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
323
+ Expect (manifests ).To (Equal (string (expectedManifests )))
324
324
})
325
325
It ("should deploy all providers with manager defined but no feature gates enabled" , func () {
326
326
manifests , err := helmChart .Run (map [string ]string {
327
327
"configSecret.name" : "test-secret-name" ,
328
328
"configSecret.namespace" : "test-secret-namespace" ,
329
+ "core" : "cluster-api" ,
329
330
"infrastructure" : "azure" ,
330
331
"addon" : "helm" ,
331
- "core" : "cluster-api" ,
332
332
"manager.cert-manager.enabled" : "false" ,
333
333
"manager.cert-manager.installCRDs" : "false" ,
334
334
})
335
335
Expect (err ).ToNot (HaveOccurred ())
336
336
Expect (manifests ).ToNot (BeEmpty ())
337
- expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "all-providers-latest-versions .yaml" ))
337
+ expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "all-providers-manager-defined-no-feature-gates .yaml" ))
338
338
Expect (err ).ToNot (HaveOccurred ())
339
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
339
+ Expect (manifests ).To (Equal (string (expectedManifests )))
340
340
})
341
341
It ("should deploy all providers when manager is defined but another infrastructure spec field is defined" , func () {
342
342
manifests , err := helmChart .Run (map [string ]string {
@@ -352,7 +352,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
352
352
Expect (manifests ).ToNot (BeEmpty ())
353
353
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "manager-defined-missing-other-infra-spec.yaml" ))
354
354
Expect (err ).ToNot (HaveOccurred ())
355
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
355
+ Expect (manifests ).To (Equal (string (expectedManifests )))
356
356
})
357
357
It ("should deploy kubeadm control plane with manager specified" , func () {
358
358
manifests , err := helmChart .Run (map [string ]string {
@@ -368,6 +368,6 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
368
368
Expect (manifests ).ToNot (BeEmpty ())
369
369
expectedManifests , err := os .ReadFile (filepath .Join (customManifestsFolder , "kubeadm-manager-defined.yaml" ))
370
370
Expect (err ).ToNot (HaveOccurred ())
371
- Expect (manifests ).To (MatchYAML (string (expectedManifests )))
371
+ Expect (manifests ).To (Equal (string (expectedManifests )))
372
372
})
373
373
})
0 commit comments