@@ -38,6 +38,9 @@ import (
3838 remote "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/test/remote"
3939)
4040
41+ const (
42+ noMachineType = "none"
43+
4144var (
4245 project = flag .String ("project" , "" , "Project to run tests in" )
4346 serviceAccount = flag .String ("service-account" , "" , "Service account to bring up instance with" )
5558 enableConfidentialCompute = flag .Bool ("enable-confidential-compute" , false , "Create VMs with confidential compute mode. This uses NVMe devices" )
5659 // Multi-writer is only supported on M3, C3, and N4
5760 // 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" )
61+ hdMachineType = flag .String ("hyperdisk-machine-type" , "c3-standard-4" , "Type of machine to provision instance on, or `none' to skip " )
5962 hdMinCpuPlatform = flag .String ("hyperdisk-min-cpu-platform" , "sapphirerapids" , "Minimum CPU architecture" )
6063
6164 testContexts = []* remote.TestContext {}
@@ -121,11 +124,13 @@ var _ = BeforeSuite(func() {
121124 }(zone , j )
122125 }
123126 wg .Add (1 )
124- go func (curZone string ) {
125- defer GinkgoRecover ()
126- defer wg .Done ()
127- hdtcc <- NewTestContext (curZone , * hdMinCpuPlatform , * hdMachineType , "0" )
128- }(zone )
127+ if * hdMachineType != noMachineType {
128+ go func (curZone string ) {
129+ defer GinkgoRecover ()
130+ defer wg .Done ()
131+ hdtcc <- NewTestContext (curZone , * hdMinCpuPlatform , * hdMachineType , "0" )
132+ }(zone )
133+ }
129134 wg .Wait ()
130135 }
131136
0 commit comments