Skip to content

Commit e97ce22

Browse files
committed
Use more realistic pull secret in unit tests
1 parent b8d5671 commit e97ce22

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

pkg/asset/agent/installconfig_test.go

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ baseDomain: test-domain
3838
platform:
3939
aws:
4040
region: us-east-1
41-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
41+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
4242
`,
4343
expectedFound: false,
4444
expectedError: `invalid install-config configuration: Platform: Unsupported value: "aws": supported values: "baremetal", "vsphere", "none", "external"`,
@@ -84,7 +84,7 @@ platform:
8484
bootMACAddress: 52:54:01:bb:bb:b1
8585
- name: host3
8686
bootMACAddress: 52:54:01:cc:cc:c1
87-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
87+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
8888
`,
8989
expectedFound: false,
9090
expectedError: "invalid install-config configuration: [platform.baremetal.apiVIPs: Required value: must specify at least one VIP for the API, platform.baremetal.apiVIPs: Required value: must specify VIP for API, when VIP for ingress is set]",
@@ -105,7 +105,7 @@ platform:
105105
password: testpassword
106106
datacenter: testDatacenter
107107
defaultDatastore: testDatastore
108-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
108+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
109109
`,
110110
expectedFound: false,
111111
expectedError: `invalid install-config configuration: [platform.vsphere.ingressVIPs: Required value: must specify VIP for ingress, when VIP for API is set, Platform.VSphere.failureDomains.topology.folder: Required value: must specify a folder for agent-based installs]`,
@@ -139,7 +139,7 @@ platform:
139139
folder: "/testDatacenter/vm/testFolder"
140140
networks:
141141
- testNetwork
142-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
142+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
143143
`,
144144
expectedFound: false,
145145
expectedError: `invalid install-config configuration: platform.vsphere.ingressVIPs: Required value: must specify VIP for ingress, when VIP for API is set`,
@@ -186,7 +186,7 @@ platform:
186186
folder: "/testDatacenter2/vm/testFolder"
187187
networks:
188188
- testNetwork2
189-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
189+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
190190
`,
191191
expectedFound: false,
192192
expectedError: `invalid install-config configuration: [platform.vsphere.failureDomains.server: Invalid value: "diff1.vcenter.com": server does not exist in vcenters, platform.vsphere.failureDomains.server: Invalid value: "diff2.vcenter.com": server does not exist in vcenters]`,
@@ -205,7 +205,7 @@ platform:
205205
ingressVips:
206206
- 192.168.122.11
207207
vCenter: test.vcenter.com
208-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
208+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
209209
`,
210210
expectedFound: false,
211211
expectedError: `invalid install-config configuration: [Platform.VSphere.username: Required value: All credential fields are required if any one is specified, Platform.VSphere.password: Required value: All credential fields are required if any one is specified, Platform.VSphere.datacenter: Required value: All credential fields are required if any one is specified, Platform.VSphere.failureDomains.topology.folder: Required value: must specify a folder for agent-based installs]`,
@@ -226,7 +226,7 @@ platform:
226226
vcenters:
227227
- server: test.vcenter.com
228228
user: testuser
229-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
229+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
230230
`,
231231
expectedFound: false,
232232
expectedError: `invalid install-config configuration: [Platform.VSphere.password: Required value: All credential fields are required if any one is specified, Platform.VSphere.datacenter: Required value: All credential fields are required if any one is specified, Platform.VSphere.failureDomains.topology.folder: Required value: must specify a folder for agent-based installs]`,
@@ -242,7 +242,7 @@ platform:
242242
vsphere:
243243
apiVips:
244244
- 192.168.122.10
245-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
245+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
246246
`,
247247
expectedFound: false,
248248
expectedError: `invalid install-config configuration: platform.vsphere.ingressVIPs: Required value: must specify VIP for ingress, when VIP for API is set`,
@@ -264,7 +264,7 @@ controlPlane:
264264
replicas: 1
265265
platform:
266266
none : {}
267-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
267+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
268268
`,
269269
expectedFound: false,
270270
expectedError: "invalid install-config configuration: Compute.Replicas: Required value: Total number of Compute.Replicas must be 0 when ControlPlane.Replicas is 1 for platform none or external. Found 3",
@@ -293,7 +293,7 @@ controlPlane:
293293
platform:
294294
aws:
295295
region: us-east-1
296-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
296+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
297297
`,
298298
expectedFound: false,
299299
expectedError: "invalid install-config configuration: [Platform: Unsupported value: \"aws\": supported values: \"baremetal\", \"vsphere\", \"none\", \"external\", Platform: Invalid value: \"aws\": Only platform none and external supports 1 ControlPlane and 0 Compute nodes]",
@@ -332,7 +332,7 @@ platform:
332332
bootMACAddress: 52:54:01:bb:bb:b1
333333
- name: host3
334334
bootMACAddress: 52:54:01:cc:cc:c1
335-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
335+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
336336
`,
337337
expectedFound: false,
338338
expectedError: "invalid install-config configuration: Platform: Invalid value: \"baremetal\": CPU architecture \"ppc64le\" only supports platform \"none\".",
@@ -371,7 +371,7 @@ platform:
371371
bootMACAddress: 52:54:01:bb:bb:b1
372372
- name: host3
373373
bootMACAddress: 52:54:01:cc:cc:c1
374-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
374+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
375375
`,
376376
expectedFound: false,
377377
expectedError: "invalid install-config configuration: Platform: Invalid value: \"baremetal\": CPU architecture \"s390x\" only supports platform \"none\".",
@@ -400,7 +400,7 @@ controlPlane:
400400
platform:
401401
external:
402402
platformName: some-cloud-provider
403-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
403+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
404404
`,
405405
expectedFound: true,
406406
expectedConfig: &types.InstallConfig{
@@ -445,7 +445,7 @@ pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
445445
CloudControllerManager: "",
446446
},
447447
},
448-
PullSecret: `{"auths":{"example.com":{"auth":"authorization value"}}}`,
448+
PullSecret: `{"auths":{"example.com":{"auth":"c3VwZXItc2VjcmV0Cg=="}}}`,
449449
Publish: types.ExternalPublishingStrategy,
450450
},
451451
},
@@ -459,7 +459,7 @@ baseDomain: test-domain
459459
platform:
460460
external:
461461
platformName: oci
462-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
462+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
463463
`,
464464
expectedFound: false,
465465
expectedError: `invalid install-config configuration: Platform.External.CloudControllerManager: Invalid value: "": When using external oci platform, Platform.External.CloudControllerManager must be set to External`,
@@ -487,7 +487,7 @@ controlPlane:
487487
replicas: 1
488488
platform:
489489
none : {}
490-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
490+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
491491
`,
492492
expectedFound: true,
493493
expectedConfig: &types.InstallConfig{
@@ -527,7 +527,7 @@ pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
527527
},
528528
},
529529
Platform: types.Platform{None: &none.Platform{}},
530-
PullSecret: `{"auths":{"example.com":{"auth":"authorization value"}}}`,
530+
PullSecret: `{"auths":{"example.com":{"auth":"c3VwZXItc2VjcmV0Cg=="}}}`,
531531
Publish: types.ExternalPublishingStrategy,
532532
},
533533
},
@@ -554,7 +554,7 @@ controlPlane:
554554
replicas: 3
555555
platform:
556556
none : {}
557-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
557+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
558558
`,
559559
expectedFound: true,
560560
expectedConfig: &types.InstallConfig{
@@ -594,7 +594,7 @@ pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
594594
},
595595
},
596596
Platform: types.Platform{None: &none.Platform{}},
597-
PullSecret: `{"auths":{"example.com":{"auth":"authorization value"}}}`,
597+
PullSecret: `{"auths":{"example.com":{"auth":"c3VwZXItc2VjcmV0Cg=="}}}`,
598598
Publish: types.ExternalPublishingStrategy,
599599
},
600600
},
@@ -656,7 +656,7 @@ platform:
656656
bootMACAddress: 52:54:01:dd:dd:d1
657657
- name: host5
658658
bootMACAddress: 52:54:01:ee:ee:e1
659-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
659+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
660660
`,
661661
expectedFound: true,
662662
expectedConfig: &types.InstallConfig{
@@ -755,7 +755,7 @@ pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
755755
BootstrapExternalStaticGateway: "gateway",
756756
},
757757
},
758-
PullSecret: `{"auths":{"example.com":{"auth":"authorization value"}}}`,
758+
PullSecret: `{"auths":{"example.com":{"auth":"c3VwZXItc2VjcmV0Cg=="}}}`,
759759
Publish: types.ExternalPublishingStrategy,
760760
},
761761
},
@@ -799,7 +799,7 @@ platform:
799799
apiVIP: 192.168.122.10
800800
ingressVIPs:
801801
- 192.168.122.11
802-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
802+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
803803
`,
804804
expectedFound: true,
805805
expectedConfig: &types.InstallConfig{
@@ -873,7 +873,7 @@ pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
873873
}},
874874
},
875875
},
876-
PullSecret: `{"auths":{"example.com":{"auth":"authorization value"}}}`,
876+
PullSecret: `{"auths":{"example.com":{"auth":"c3VwZXItc2VjcmV0Cg=="}}}`,
877877
Publish: types.ExternalPublishingStrategy,
878878
},
879879
},
@@ -908,7 +908,7 @@ platform:
908908
- 192.168.122.11
909909
apiVIPs:
910910
- 192.168.122.10
911-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
911+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
912912
`,
913913
expectedFound: false,
914914
expectedError: "invalid install-config configuration: platform.baremetal.provisioningNetwork: Unsupported value: \"UNMANAGED\": supported values: \"Disabled\", \"Managed\", \"Unmanaged\"",
@@ -968,7 +968,7 @@ platform:
968968
username: "admin"
969969
password: "password"
970970
address: "redfish+http://10.10.10.2:8000/redfish/v1/Systems/1234"
971-
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
971+
pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"c3VwZXItc2VjcmV0Cg==\"}}}"
972972
`,
973973
expectedFound: false,
974974
expectedError: `invalid install-config configuration: [Platform.BareMetal.clusterProvisioningIP: Invalid value: "172.22.0.11": "172.22.0.11" overlaps with the allocated DHCP range, Platform.BareMetal.hosts[2].BMC.Address: Duplicate value: "redfish+http://10.10.10.2:8000/redfish/v1/Systems/1234"]`,

0 commit comments

Comments
 (0)