Skip to content

Commit 810c059

Browse files
committed
Updated multi disk e2e based on reviews
1 parent e5ff3fa commit 810c059

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

test/e2e/data/infrastructure-vsphere-govmomi/main/multi-disk/data-disks-patch.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ spec:
77
template:
88
spec:
99
dataDisks:
10-
- name: "etcd"
10+
- name: "disk_1"
1111
sizeGiB: 10
12-
- name: "container-images"
12+
- name: "disk_2"
1313
sizeGiB: 20
1414
---
1515
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
@@ -21,5 +21,5 @@ spec:
2121
template:
2222
spec:
2323
dataDisks:
24-
- name: "container-images"
24+
- name: "disk_1"
2525
sizeGiB: 20

test/e2e/multi-disk_test.go renamed to test/e2e/multi_disk_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2022 The Kubernetes Authors.
2+
Copyright 2024 The Kubernetes Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -29,12 +29,12 @@ import (
2929
. "sigs.k8s.io/cluster-api/test/framework/ginkgoextensions"
3030
)
3131

32-
type DiskSpecInput struct {
32+
type diskSpecInput struct {
3333
InfraClients
34-
Global GlobalInput
35-
SpecName string
36-
Namespace string
37-
ClusterName string
34+
global GlobalInput
35+
specName string
36+
namespace string
37+
clusterName string
3838
}
3939

4040
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
5050
Flavor: ptr.To(testSpecificSettingsGetter().FlavorForMode("multi-disk")),
5151
PostNamespaceCreated: testSpecificSettingsGetter().PostNamespaceCreatedFunc,
5252
PostMachinesProvisioned: func(_ framework.ClusterProxy, namespace, clusterName string) {
53-
dsi := DiskSpecInput{
54-
SpecName: specName,
55-
Namespace: namespace,
56-
ClusterName: clusterName,
53+
dsi := diskSpecInput{
54+
specName: specName,
55+
namespace: namespace,
56+
clusterName: clusterName,
5757
InfraClients: InfraClients{
5858
Client: vsphereClient,
5959
RestClient: restClient,
6060
Finder: vsphereFinder,
6161
},
62-
Global: GlobalInput{
62+
global: GlobalInput{
6363
BootstrapClusterProxy: bootstrapClusterProxy,
6464
ClusterctlConfigPath: testSpecificSettingsGetter().ClusterctlConfigPath,
6565
E2EConfig: e2eConfig,
@@ -75,9 +75,9 @@ var _ = Describe("Ensure govmomi mode is able to add additional disks to VMs", f
7575
})
7676
})
7777

78-
func verifyDisks(ctx context.Context, input DiskSpecInput) {
79-
Byf("Fetching the VSphereVM objects for the cluster %s", input.ClusterName)
80-
vms := getVSphereVMsForCluster(input.ClusterName, input.Namespace)
78+
func verifyDisks(ctx context.Context, input diskSpecInput) {
79+
Byf("Fetching the VSphereVM objects for the cluster %s", input.clusterName)
80+
vms := getVSphereVMsForCluster(input.clusterName, input.namespace)
8181

8282
By("Verifying the disks attached to the VMs")
8383
for _, vm := range vms.Items {

0 commit comments

Comments
 (0)