mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 14:53:44 +00:00
testserver: allow caller to set up ktesting
In scheduler_perf, the caller configures ktesting without per-test output. When StartTestServer initialized it again, it did so with per-test output. In other cases it might have been simply redundant.
This commit is contained in:
parent
b1559c66ca
commit
6ee2c63135
@ -150,7 +150,11 @@ func NewDefaultTestServerOptions() *TestServerInstanceOptions {
|
||||
// files that because Golang testing's call to os.Exit will not give a stop channel go routine
|
||||
// enough time to remove temporary files.
|
||||
func StartTestServer(t ktesting.TB, instanceOptions *TestServerInstanceOptions, customFlags []string, storageConfig *storagebackend.Config) (result TestServer, err error) {
|
||||
tCtx := ktesting.Init(t)
|
||||
// Some callers may have initialize ktesting already.
|
||||
tCtx, ok := t.(ktesting.TContext)
|
||||
if !ok {
|
||||
tCtx = ktesting.Init(t)
|
||||
}
|
||||
|
||||
if instanceOptions == nil {
|
||||
instanceOptions = NewDefaultTestServerOptions()
|
||||
|
Loading…
Reference in New Issue
Block a user