Skip to content

Commit

Permalink
Updated multi disk e2e based on reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
vr4manta committed Dec 5, 2024
1 parent e5ff3fa commit 810c059
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,5 +21,5 @@ spec:
template:
spec:
dataDisks:
- name: "container-images"
- name: "disk_1"
sizeGiB: 20
28 changes: 14 additions & 14 deletions test/e2e/multi-disk_test.go → test/e2e/multi_disk_test.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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() {
Expand All @@ -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,
Expand All @@ -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 {
Expand Down

0 comments on commit 810c059

Please sign in to comment.