@@ -38,6 +38,10 @@ import (
3838 remote "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/test/remote"
3939)
4040
41+ const (
42+ noMachineType = "none"
43+ )
44+
4145var (
4246 project = flag .String ("project" , "" , "Project to run tests in" )
4347 serviceAccount = flag .String ("service-account" , "" , "Service account to bring up instance with" )
5559 enableConfidentialCompute = flag .Bool ("enable-confidential-compute" , false , "Create VMs with confidential compute mode. This uses NVMe devices" )
5660 // Multi-writer is only supported on M3, C3, and N4
5761 // https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms#hd-multi-writer
58- hdMachineType = flag .String ("hyperdisk-machine-type" , "c3-standard-4" , "Type of machine to provision instance on" )
62+ hdMachineType = flag .String ("hyperdisk-machine-type" , "c3-standard-4" , "Type of machine to provision instance on, or `none' to skip " )
5963 hdMinCpuPlatform = flag .String ("hyperdisk-min-cpu-platform" , "sapphirerapids" , "Minimum CPU architecture" )
6064
6165 testContexts = []* remote.TestContext {}
@@ -121,11 +125,13 @@ var _ = BeforeSuite(func() {
121125 }(zone , j )
122126 }
123127 wg .Add (1 )
124- go func (curZone string ) {
125- defer GinkgoRecover ()
126- defer wg .Done ()
127- hdtcc <- NewTestContext (curZone , * hdMinCpuPlatform , * hdMachineType , "0" )
128- }(zone )
128+ if * hdMachineType != noMachineType {
129+ go func (curZone string ) {
130+ defer GinkgoRecover ()
131+ defer wg .Done ()
132+ hdtcc <- NewTestContext (curZone , * hdMinCpuPlatform , * hdMachineType , "0" )
133+ }(zone )
134+ }
129135 wg .Wait ()
130136 }
131137
0 commit comments