@@ -35,6 +35,8 @@ import (
35
35
36
36
var (
37
37
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" )
38
40
serviceAccount = flag .String ("service-account" , "" , "Service account to bring up instance with" )
39
41
zones = flag .String ("zones" , "us-central1-c,us-central1-b" , "Zones to run tests in. If there are multiple zones, separate each by comma" )
40
42
machineType = flag .String ("machine-type" , "n1-standard-1" , "Type of machine to provision instance on" )
@@ -90,7 +92,7 @@ var _ = BeforeSuite(func() {
90
92
for _ , zone := range zones {
91
93
go func (curZone string ) {
92
94
defer GinkgoRecover ()
93
- nodeID := fmt . Sprintf ( "gce-pd-csi-e2e-%s" , curZone )
95
+ nodeID := getNodeId ( * vmName , curZone )
94
96
klog .Infof ("Setting up node %s\n " , nodeID )
95
97
96
98
i , err := remote .SetupInstance (* project , curZone , nodeID , * machineType , * serviceAccount , * imageURL , computeService )
@@ -146,3 +148,10 @@ func getRandomTestContext() *remote.TestContext {
146
148
rn := rand .Intn (len (testContexts ))
147
149
return testContexts [rn ]
148
150
}
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