Skip to content

Commit 6da25ff

Browse files
committed
CCM: Remove check for clouds.conf key
The config file stored here was used for the legacy CCM. It is not relevant to the external CCM and we would like to stop setting it in [1]. Remove the test, allowing us to do so. [1] openshift/installer#9601 Signed-off-by: Stephen Finucane <[email protected]>
1 parent 1343746 commit 6da25ff

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

Diff for: test/extended/openstack/cloud-provider-config.go

+2-13
Original file line numberDiff line numberDiff line change
@@ -192,29 +192,18 @@ var _ = g.Describe("[sig-installer][Suite:openshift/openstack] The Openshift", f
192192
o.Expect(role.Rules[0].ResourceNames[0]).To(o.Equal(expectedSecretName),
193193
"Unexpected resourceName on role %q in %q namespace", openstackCredsRole, systemNamespace)
194194

195-
g.By(fmt.Sprintf("Getting the openstack auth url from clouds.conf in secret %q in %q namespace",
196-
expectedSecretName, systemNamespace))
195+
g.By(fmt.Sprintf("Getting the credentials secret %q in %q namespace", expectedSecretName, systemNamespace))
197196
secret, err := clientSet.CoreV1().Secrets(systemNamespace).Get(ctx, expectedSecretName, metav1.GetOptions{})
198197
o.Expect(err).NotTo(o.HaveOccurred(), "Secret %q not found in %q namespace", expectedSecretName, systemNamespace)
199-
conf, err := ini.Load([]byte(secret.Data["clouds.conf"]))
200-
o.Expect(err).NotTo(o.HaveOccurred(),
201-
"clouds.conf key not found on %q secret in %q namespace", expectedSecretName, systemNamespace)
202-
globalSection, err := conf.GetSection("Global")
203-
o.Expect(err).NotTo(o.HaveOccurred(),
204-
"section Global not found on %q secret in %q namespace", expectedSecretName, systemNamespace)
205-
authUrl, err := globalSection.GetKey("auth-url")
206-
o.Expect(err).NotTo(o.HaveOccurred(),
207-
"property auth-url not found on %q secret in %q namespace", expectedSecretName, systemNamespace)
208198

209-
g.By(fmt.Sprintf("Getting the openstack auth url from clouds.yaml in secret %q in %q namespace", expectedSecretName, systemNamespace))
199+
g.By(fmt.Sprintf("Unmarshalling the clouds.yaml extracted from secret %q in %q namespace", expectedSecretName, systemNamespace))
210200
cloudsYaml := make(map[string]map[string]*clouds.Cloud)
211201
err = yaml.Unmarshal([]byte(secret.Data["clouds.yaml"]), &cloudsYaml)
212202
o.Expect(err).NotTo(o.HaveOccurred(),
213203
"Error unmarshaling clouds.yaml on %q secret in %q namespace", expectedSecretName, systemNamespace)
214204
clouds := cloudsYaml["clouds"]["openstack"]
215205

216206
g.By("Compare cloud auth url on secret with openstack API")
217-
o.Expect(computeClient.IdentityEndpoint).To(o.HavePrefix(authUrl.Value()), "Unexpected auth url on clouds.conf")
218207
o.Expect(computeClient.IdentityEndpoint).To(o.HavePrefix(clouds.AuthInfo.AuthURL), "Unexpected auth url on clouds.yaml")
219208

220209
})

0 commit comments

Comments
 (0)