Updating methods to return error rather than using glog.Fatalf

This commit is contained in:
nikhiljindal
2016-02-03 14:26:11 -08:00
parent 2aa28c6553
commit c7beb9078c
16 changed files with 128 additions and 38 deletions

View File

@@ -408,7 +408,10 @@ func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config,
masterConfig.AdmissionControl = serviceAccountAdmission
// Create a master and install handlers into mux.
m = master.New(masterConfig)
m, err := master.New(masterConfig)
if err != nil {
t.Fatalf("Error in bringing up the master: %v", err)
}
// Start the service account and service account token controllers
tokenController := serviceaccountcontroller.NewTokensController(rootClient, serviceaccountcontroller.TokensControllerOptions{TokenGenerator: serviceaccount.JWTTokenGenerator(serviceAccountKey)})