@@ -21,6 +21,7 @@ import (
2121 "testing"
2222 "time"
2323
24+ "github.com/golang/glog"
2425 . "github.com/onsi/ginkgo"
2526 . "github.com/onsi/gomega"
2627 computebeta "google.golang.org/api/compute/v0.beta"
@@ -68,27 +69,32 @@ var _ = BeforeSuite(func() {
6869 Expect (* project ).ToNot (BeEmpty (), "Project should not be empty" )
6970 Expect (* serviceAccount ).ToNot (BeEmpty (), "Service account should not be empty" )
7071
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 )
7273
7374 for _ , zone := range zones {
7475 go func (curZone string ) {
7576 defer GinkgoRecover ()
7677 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 )
7879
7980 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+ }
8184
85+ glog .Infof ("Creating new driver and client for node %s\n " , i .GetName ())
8286 // Create new driver and client
8387 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+ }
8591 tcc <- testContext
8692 }(zone )
8793 }
8894
8995 for i := 0 ; i < len (zones ); i ++ {
9096 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 ())
9298 testContexts = append (testContexts , tc )
9399 }
94100})
0 commit comments