Skip to content

Commit 14a72dc

Browse files
committed
Update TestBaremetalGeneratedAssetFiles
Update test method TestBaremetalGeneratedAssetFiles() to create a valid Baremetal IPI install config.
1 parent 41b6e16 commit 14a72dc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/asset/machines/master_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,14 @@ func TestBaremetalGeneratedAssetFiles(t *testing.T) {
275275
},
276276
},
277277
ControlPlane: &types.MachinePool{
278-
Replicas: pointer.Int64Ptr(1),
278+
Replicas: ptr.To(3),
279279
Platform: types.MachinePoolPlatform{
280280
BareMetal: &baremetal.MachinePool{},
281281
},
282282
},
283283
Compute: []types.MachinePool{
284284
{
285-
Replicas: pointer.Int64Ptr(1),
285+
Replicas: ptr.To(1),
286286
Platform: types.MachinePoolPlatform{},
287287
},
288288
},
@@ -306,13 +306,13 @@ func TestBaremetalGeneratedAssetFiles(t *testing.T) {
306306
master := &Master{}
307307
assert.NoError(t, master.Generate(context.Background(), parents))
308308

309-
assert.Len(t, master.HostFiles, 2)
309+
assert.Len(t, master.HostFiles, 4)
310310
verifyHost(t, master.HostFiles[0], "openshift/99_openshift-cluster-api_hosts-0.yaml", "master-0")
311-
verifyHost(t, master.HostFiles[1], "openshift/99_openshift-cluster-api_hosts-1.yaml", "worker-0")
311+
verifyHost(t, master.HostFiles[3], "openshift/99_openshift-cluster-api_hosts-1.yaml", "worker-0")
312312

313-
assert.Len(t, master.SecretFiles, 2)
313+
assert.Len(t, master.SecretFiles, 4)
314314
verifySecret(t, master.SecretFiles[0], "openshift/99_openshift-cluster-api_host-bmc-secrets-0.yaml", "master-0-bmc-secret", "map[password:[112 119 100 45 48] username:[117 115 114 45 48]]")
315-
verifySecret(t, master.SecretFiles[1], "openshift/99_openshift-cluster-api_host-bmc-secrets-1.yaml", "worker-0-bmc-secret", "map[password:[112 119 100 45 49] username:[117 115 114 45 49]]")
315+
verifySecret(t, master.SecretFiles[3], "openshift/99_openshift-cluster-api_host-bmc-secrets-1.yaml", "worker-0-bmc-secret", "map[password:[112 119 100 45 49] username:[117 115 114 45 49]]")
316316

317317
assert.Len(t, master.NetworkConfigSecretFiles, 1)
318318
verifySecret(t, master.NetworkConfigSecretFiles[0], "openshift/99_openshift-cluster-api_host-network-config-secrets-0.yaml", "master-0-network-config-secret", "map[nmstate:[105 110 116 101 114 102 97 99 101 115 58 32 110 117 108 108 10]]")

0 commit comments

Comments
 (0)