Merge pull request #103360 from m14815/commit-21.6.3

Error should be checked first, then go to other steps.
This commit is contained in:
Kubernetes Prow Robot 2021-07-01 15:36:03 -07:00 committed by GitHub
commit 2d4753b898
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -215,12 +215,12 @@ func StartTestServer(t Logger, instanceOptions *TestServerInstanceOptions, custo
t.Logf("runtime-config=%v", completedOptions.APIEnablement.RuntimeConfig)
t.Logf("Starting kube-apiserver on port %d...", s.SecureServing.BindPort)
server, err := app.CreateServerChain(completedOptions, stopCh)
if instanceOptions.StorageVersionWrapFunc != nil {
server.GenericAPIServer.StorageVersionManager = instanceOptions.StorageVersionWrapFunc(server.GenericAPIServer.StorageVersionManager)
}
if err != nil {
return result, fmt.Errorf("failed to create server chain: %v", err)
}
if instanceOptions.StorageVersionWrapFunc != nil {
server.GenericAPIServer.StorageVersionManager = instanceOptions.StorageVersionWrapFunc(server.GenericAPIServer.StorageVersionManager)
}
errCh := make(chan error)
go func(stopCh <-chan struct{}) {