mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Error should be checked first, then go to other steps.
This commit is contained in:
parent
7ad7c0757a
commit
da4aaf81cd
@ -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{}) {
|
||||
|
Loading…
Reference in New Issue
Block a user