From 810c059ad2d65a2d16333f48e5e8e805cd32e747 Mon Sep 17 00:00:00 2001 From: vr4manta Date: Thu, 5 Dec 2024 11:08:38 -0500 Subject: [PATCH] Updated multi disk e2e based on reviews --- .../main/multi-disk/data-disks-patch.yaml | 6 ++-- ...{multi-disk_test.go => multi_disk_test.go} | 28 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) rename test/e2e/{multi-disk_test.go => multi_disk_test.go} (87%) diff --git a/test/e2e/data/infrastructure-vsphere-govmomi/main/multi-disk/data-disks-patch.yaml b/test/e2e/data/infrastructure-vsphere-govmomi/main/multi-disk/data-disks-patch.yaml index 1e58792edb..fcb61923e9 100644 --- a/test/e2e/data/infrastructure-vsphere-govmomi/main/multi-disk/data-disks-patch.yaml +++ b/test/e2e/data/infrastructure-vsphere-govmomi/main/multi-disk/data-disks-patch.yaml @@ -7,9 +7,9 @@ spec: template: spec: dataDisks: - - name: "etcd" + - name: "disk_1" sizeGiB: 10 - - name: "container-images" + - name: "disk_2" sizeGiB: 20 --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 @@ -21,5 +21,5 @@ spec: template: spec: dataDisks: - - name: "container-images" + - name: "disk_1" sizeGiB: 20 diff --git a/test/e2e/multi-disk_test.go b/test/e2e/multi_disk_test.go similarity index 87% rename from test/e2e/multi-disk_test.go rename to test/e2e/multi_disk_test.go index fc09465fe5..848e70dba1 100644 --- a/test/e2e/multi-disk_test.go +++ b/test/e2e/multi_disk_test.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Kubernetes Authors. +Copyright 2024 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -29,12 +29,12 @@ import ( . "sigs.k8s.io/cluster-api/test/framework/ginkgoextensions" ) -type DiskSpecInput struct { +type diskSpecInput struct { InfraClients - Global GlobalInput - SpecName string - Namespace string - ClusterName string + global GlobalInput + specName string + namespace string + clusterName string } var _ = Describe("Ensure govmomi mode is able to add additional disks to VMs", func() { @@ -50,16 +50,16 @@ var _ = Describe("Ensure govmomi mode is able to add additional disks to VMs", f Flavor: ptr.To(testSpecificSettingsGetter().FlavorForMode("multi-disk")), PostNamespaceCreated: testSpecificSettingsGetter().PostNamespaceCreatedFunc, PostMachinesProvisioned: func(_ framework.ClusterProxy, namespace, clusterName string) { - dsi := DiskSpecInput{ - SpecName: specName, - Namespace: namespace, - ClusterName: clusterName, + dsi := diskSpecInput{ + specName: specName, + namespace: namespace, + clusterName: clusterName, InfraClients: InfraClients{ Client: vsphereClient, RestClient: restClient, Finder: vsphereFinder, }, - Global: GlobalInput{ + global: GlobalInput{ BootstrapClusterProxy: bootstrapClusterProxy, ClusterctlConfigPath: testSpecificSettingsGetter().ClusterctlConfigPath, E2EConfig: e2eConfig, @@ -75,9 +75,9 @@ var _ = Describe("Ensure govmomi mode is able to add additional disks to VMs", f }) }) -func verifyDisks(ctx context.Context, input DiskSpecInput) { - Byf("Fetching the VSphereVM objects for the cluster %s", input.ClusterName) - vms := getVSphereVMsForCluster(input.ClusterName, input.Namespace) +func verifyDisks(ctx context.Context, input diskSpecInput) { + Byf("Fetching the VSphereVM objects for the cluster %s", input.clusterName) + vms := getVSphereVMsForCluster(input.clusterName, input.namespace) By("Verifying the disks attached to the VMs") for _, vm := range vms.Items {