Skip to content

Commit 5bc06cb

Browse files
sjswerdlowtonyzhc
authored andcommitted
Fixing rebasing issues.
1 parent 26a11d1 commit 5bc06cb

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

test/e2e/tests/setup_e2e_test.go

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,24 @@ import (
3636
)
3737

3838
var (
39-
project = flag.String("project", "", "Project to run tests in")
40-
serviceAccount = flag.String("service-account", "", "Service account to bring up instance with")
41-
vmNamePrefix = flag.String("vm-name-prefix", "gce-pd-csi-e2e", "VM name prefix")
42-
architecture = flag.String("arch", "amd64", "Architecture pd csi driver build on")
43-
minCpuPlatform = flag.String("min-cpu-platform", "rome", "Minimum CPU architecture")
44-
mwMinCpuPlatform = flag.String("min-cpu-platform-mw", "sapphirerapids", "Minimum CPU architecture for multiwriter tests")
45-
zones = flag.String("zones", "us-east4-a,us-east4-c", "Zones to run tests in. If there are multiple zones, separate each by comma")
46-
machineType = flag.String("machine-type", "n2d-standard-4", "Type of machine to provision instance on")
47-
// Multi-writer is only supported on M3, C3, and N4
48-
// https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms#hd-multi-writer
49-
mwMachineType = flag.String("mw-machine-type", "c3-standard-4", "Type of machine to provision instance for multiwriter tests")
39+
project = flag.String("project", "", "Project to run tests in")
40+
serviceAccount = flag.String("service-account", "", "Service account to bring up instance with")
41+
vmNamePrefix = flag.String("vm-name-prefix", "gce-pd-csi-e2e", "VM name prefix")
42+
architecture = flag.String("arch", "amd64", "Architecture pd csi driver build on")
43+
minCpuPlatform = flag.String("min-cpu-platform", "rome", "Minimum CPU architecture")
44+
mwMinCpuPlatform = flag.String("min-cpu-platform-mw", "sapphirerapids", "Minimum CPU architecture for multiwriter tests")
45+
zones = flag.String("zones", "us-east4-a,us-east4-c", "Zones to run tests in. If there are multiple zones, separate each by comma")
46+
machineType = flag.String("machine-type", "n2d-standard-4", "Type of machine to provision instance on")
5047
imageURL = flag.String("image-url", "projects/ubuntu-os-cloud/global/images/family/ubuntu-minimal-2404-lts-amd64", "OS image url to get image from")
5148
runInProw = flag.Bool("run-in-prow", false, "If true, use a Boskos loaned project and special CI service accounts and ssh keys")
5249
deleteInstances = flag.Bool("delete-instances", false, "Delete the instances after tests run")
5350
cloudtopHost = flag.Bool("cloudtop-host", false, "The local host is cloudtop, a kind of googler machine with special requirements to access GCP")
5451
extraDriverFlags = flag.String("extra-driver-flags", "", "Extra flags to pass to the driver")
5552
enableConfidentialCompute = flag.Bool("enable-confidential-compute", false, "Create VMs with confidential compute mode. This uses NVMe devices")
56-
hdMachineType = flag.String("hyperdisk-machine-type", "c3-standard-4", "Type of machine to provision instance on")
57-
hdMinCpuPlatform = flag.String("hyperdisk-min-cpu-platform", "sapphirerapids", "Minimum CPU architecture")
53+
// Multi-writer is only supported on M3, C3, and N4
54+
// https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms#hd-multi-writer
55+
hdMachineType = flag.String("hyperdisk-machine-type", "c3-standard-4", "Type of machine to provision instance on")
56+
hdMinCpuPlatform = flag.String("hyperdisk-min-cpu-platform", "sapphirerapids", "Minimum CPU architecture")
5857

5958
testContexts = []*remote.TestContext{}
6059
hyperdiskTestContexts = []*remote.TestContext{}
@@ -121,8 +120,6 @@ var _ = BeforeSuite(func() {
121120
for i := 0; i < len(zones); i++ {
122121
tc := <-tcc
123122
testContexts = append(testContexts, tc)
124-
mwTc := <-mwTcc
125-
multiWriterTestContexts = append(multiWriterTestContexts, mwTc)
126123
klog.Infof("Added TestContext for node %s", tc.Instance.GetName())
127124
tc = <-hdtcc
128125
hyperdiskTestContexts = append(hyperdiskTestContexts, tc)
@@ -138,7 +135,7 @@ var _ = AfterSuite(func() {
138135
tc.Instance.DeleteInstance()
139136
}
140137
}
141-
for _, mwTc := range multiWriterTestContexts {
138+
for _, mwTc := range hyperdiskTestContexts {
142139
err := remote.TeardownDriverAndClient(mwTc)
143140
Expect(err).To(BeNil(), "Multiwriter Teardown Driver and Client failed with error")
144141
if *deleteInstances {
@@ -215,7 +212,7 @@ func getRandomTestContext() *remote.TestContext {
215212
return testContexts[rn]
216213
}
217214
func getRandomMwTestContext() *remote.TestContext {
218-
Expect(multiWriterTestContexts).ToNot(BeEmpty())
219-
rn := rand.Intn(len(multiWriterTestContexts))
220-
return multiWriterTestContexts[rn]
215+
Expect(hyperdiskTestContexts).ToNot(BeEmpty())
216+
rn := rand.Intn(len(hyperdiskTestContexts))
217+
return hyperdiskTestContexts[rn]
221218
}

test/e2e/tests/single_zone_e2e_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ var _ = Describe("GCE PD CSI Driver", func() {
283283
Expect(err).To(BeNil(), "Could not find disk in correct zone")
284284
}
285285
})
286-
287286
// TODO(hime): Enable this test once all release branches contain the fix from PR#1708.
288287
// It("Should return InvalidArgument when disk size exceeds limit", func() {
289288
// // If this returns a different error code (like Unknown), the error wrapping logic in #1708 has regressed.

0 commit comments

Comments
 (0)