@@ -21,6 +21,7 @@ import (
21
21
"testing"
22
22
"time"
23
23
24
+ "github.com/golang/glog"
24
25
. "github.com/onsi/ginkgo"
25
26
. "github.com/onsi/gomega"
26
27
computebeta "google.golang.org/api/compute/v0.beta"
@@ -68,27 +69,32 @@ var _ = BeforeSuite(func() {
68
69
Expect (* project ).ToNot (BeEmpty (), "Project should not be empty" )
69
70
Expect (* serviceAccount ).ToNot (BeEmpty (), "Service account should not be empty" )
70
71
71
- Logf ("Running in project %v with service account %v\n \n " , * project , * serviceAccount )
72
+ glog . Infof ("Running in project %v with service account %v\n \n " , * project , * serviceAccount )
72
73
73
74
for _ , zone := range zones {
74
75
go func (curZone string ) {
75
76
defer GinkgoRecover ()
76
77
nodeID := fmt .Sprintf ("gce-pd-csi-e2e-%s" , curZone )
77
- Logf ("Setting up node %s\n " , nodeID )
78
+ glog . Infof ("Setting up node %s\n " , nodeID )
78
79
79
80
i , err := remote .SetupInstance (* project , curZone , nodeID , * serviceAccount , computeService )
80
- Expect (err ).To (BeNil ())
81
+ if err != nil {
82
+ glog .Fatalf ("Failed to setup instance %v: %v" , nodeID , err )
83
+ }
81
84
85
+ glog .Infof ("Creating new driver and client for node %s\n " , i .GetName ())
82
86
// Create new driver and client
83
87
testContext , err := testutils .GCEClientAndDriverSetup (i )
84
- Expect (err ).To (BeNil (), "Set up new Driver and Client failed with error" )
88
+ if err != nil {
89
+ glog .Fatalf ("Failed to set up Test Context for instance %v: %v" , i .GetName (), err )
90
+ }
85
91
tcc <- testContext
86
92
}(zone )
87
93
}
88
94
89
95
for i := 0 ; i < len (zones ); i ++ {
90
96
tc := <- tcc
91
- Logf ("Test Context for node %s set up\n " , tc .Instance .GetName ())
97
+ glog . Infof ("Test Context for node %s set up\n " , tc .Instance .GetName ())
92
98
testContexts = append (testContexts , tc )
93
99
}
94
100
})
0 commit comments