@@ -35,6 +35,8 @@ import (
3535
3636var (
3737 project = flag .String ("project" , "" , "Project to run tests in" )
38+ architecture = flag .String ("arch" , "amd64" , "Architecture pd csi driver build on" )
39+ vmName = flag .String ("vm-name" , "" , "Name of the VM to run tests on" )
3840 serviceAccount = flag .String ("service-account" , "" , "Service account to bring up instance with" )
3941 zones = flag .String ("zones" , "us-central1-c,us-central1-b" , "Zones to run tests in. If there are multiple zones, separate each by comma" )
4042 machineType = flag .String ("machine-type" , "n1-standard-1" , "Type of machine to provision instance on" )
@@ -90,7 +92,7 @@ var _ = BeforeSuite(func() {
9092 for _ , zone := range zones {
9193 go func (curZone string ) {
9294 defer GinkgoRecover ()
93- nodeID := fmt . Sprintf ( "gce-pd-csi-e2e-%s" , curZone )
95+ nodeID := getNodeId ( * vmName , curZone )
9496 klog .Infof ("Setting up node %s\n " , nodeID )
9597
9698 i , err := remote .SetupInstance (* project , curZone , nodeID , * machineType , * serviceAccount , * imageURL , computeService )
@@ -146,3 +148,10 @@ func getRandomTestContext() *remote.TestContext {
146148 rn := rand .Intn (len (testContexts ))
147149 return testContexts [rn ]
148150}
151+
152+ func getNodeId (vmName , curZone string ) string {
153+ if vmName == "" {
154+ return fmt .Sprintf ("gce-pd-csi-e2e-%s" , curZone )
155+ }
156+ return vmName
157+ }
0 commit comments