From 7ae6665e020c110d2eb4a687e44720063e3fa9d5 Mon Sep 17 00:00:00 2001 From: Kyle Wuolle Date: Mon, 2 Dec 2024 12:40:35 -0800 Subject: [PATCH] Fix up azure env var processing --- test/e2e/managedcluster/azure/azure.go | 3 +-- test/e2e/managedcluster/validate_deployed.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/e2e/managedcluster/azure/azure.go b/test/e2e/managedcluster/azure/azure.go index 02d496f9..9056e793 100644 --- a/test/e2e/managedcluster/azure/azure.go +++ b/test/e2e/managedcluster/azure/azure.go @@ -77,7 +77,6 @@ func SetAzureEnvironmentVariables(clusterName string, kc *kubeclient.KubeClient) resourceGroup := spec["resourceGroup"] GinkgoT().Setenv("AZURE_RESOURCE_GROUP", fmt.Sprintf("%s", resourceGroup)) - var subnetMap map[string]any for _, subnet := range subnets { sMap, ok := subnet.(map[string]any) Expect(ok).To(BeTrue()) @@ -89,7 +88,7 @@ func SetAzureEnvironmentVariables(clusterName string, kc *kubeclient.KubeClient) subnetName := sMap["name"] - securityGroup, found, err := unstructured.NestedMap(subnetMap, "securityGroup") + securityGroup, found, err := unstructured.NestedMap(sMap, "securityGroup") Expect(err).NotTo(HaveOccurred()) Expect(found).To(BeTrue()) securityGroupName := securityGroup["name"] diff --git a/test/e2e/managedcluster/validate_deployed.go b/test/e2e/managedcluster/validate_deployed.go index 195293e5..aa5fca51 100644 --- a/test/e2e/managedcluster/validate_deployed.go +++ b/test/e2e/managedcluster/validate_deployed.go @@ -266,8 +266,8 @@ func validateCCM(ctx context.Context, kc *kubeclient.KubeClient, clusterName str } for _, i := range service.Status.LoadBalancer.Ingress { - fmt.Printf("HOSTNAME=%s, IP=%s", i.Hostname, i.IP) - fmt.Printf("service status=%v", service.Status) + _, _ = fmt.Fprintf(GinkgoWriter, "HOSTNAME=%s, IP=%s", i.Hostname, i.IP) + _, _ = fmt.Fprintf(GinkgoWriter, "service status=%v", service.Status) if i.Hostname != "" || i.IP != "" { return nil }