@@ -36,33 +36,32 @@ import (
36
36
)
37
37
38
38
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" )
50
47
imageURL = flag .String ("image-url" , "projects/ubuntu-os-cloud/global/images/family/ubuntu-minimal-2404-lts-amd64" , "OS image url to get image from" )
51
48
runInProw = flag .Bool ("run-in-prow" , false , "If true, use a Boskos loaned project and special CI service accounts and ssh keys" )
52
49
deleteInstances = flag .Bool ("delete-instances" , false , "Delete the instances after tests run" )
53
50
cloudtopHost = flag .Bool ("cloudtop-host" , false , "The local host is cloudtop, a kind of googler machine with special requirements to access GCP" )
54
51
extraDriverFlags = flag .String ("extra-driver-flags" , "" , "Extra flags to pass to the driver" )
55
52
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" )
58
57
59
- testContexts = []* remote.TestContext {}
60
- hyperdiskTestContexts = []* remote.TestContext {}
58
+ testContexts = []* remote.TestContext {}
59
+ hyperdiskTestContexts = []* remote.TestContext {}
61
60
multiWriterTestContexts = []* remote.TestContext {}
62
- computeService * compute.Service
63
- computeAlphaService * computealpha.Service
64
- computeBetaService * computebeta.Service
65
- kmsClient * cloudkms.KeyManagementClient
61
+ computeService * compute.Service
62
+ computeAlphaService * computealpha.Service
63
+ computeBetaService * computebeta.Service
64
+ kmsClient * cloudkms.KeyManagementClient
66
65
)
67
66
68
67
func init () {
@@ -122,15 +121,14 @@ var _ = BeforeSuite(func() {
122
121
hdtcc <- NewTestContext (curZone , * hdMinCpuPlatform , * hdMachineType )
123
122
}(zone )
124
123
go func (curZone string ) {
124
+ defer GinkgoRecover ()
125
125
mwTcc <- NewTestContext (curZone , * mwMinCpuPlatform , * mwMachineType )
126
126
}(zone )
127
127
}
128
128
129
129
for i := 0 ; i < len (zones ); i ++ {
130
130
tc := <- tcc
131
131
testContexts = append (testContexts , tc )
132
- mwTc := <- mwTcc
133
- multiWriterTestContexts = append (multiWriterTestContexts , mwTc )
134
132
klog .Infof ("Added TestContext for node %s" , tc .Instance .GetName ())
135
133
tc = <- hdtcc
136
134
hyperdiskTestContexts = append (hyperdiskTestContexts , tc )
@@ -146,7 +144,7 @@ var _ = AfterSuite(func() {
146
144
tc .Instance .DeleteInstance ()
147
145
}
148
146
}
149
- for _ , mwTc := range multiWriterTestContexts {
147
+ for _ , mwTc := range hyperdiskTestContexts {
150
148
err := remote .TeardownDriverAndClient (mwTc )
151
149
Expect (err ).To (BeNil (), "Multiwriter Teardown Driver and Client failed with error" )
152
150
if * deleteInstances {
@@ -223,7 +221,7 @@ func getRandomTestContext() *remote.TestContext {
223
221
return testContexts [rn ]
224
222
}
225
223
func getRandomMwTestContext () * remote.TestContext {
226
- Expect (multiWriterTestContexts ).ToNot (BeEmpty ())
227
- rn := rand .Intn (len (multiWriterTestContexts ))
228
- return multiWriterTestContexts [rn ]
224
+ Expect (hyperdiskTestContexts ).ToNot (BeEmpty ())
225
+ rn := rand .Intn (len (hyperdiskTestContexts ))
226
+ return hyperdiskTestContexts [rn ]
229
227
}
0 commit comments