testing

package
v1.8.15-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TearDownFunc

type TearDownFunc func()

TearDownFunc is to be called to tear down a test server.

func StartTestServer

func StartTestServer(t *testing.T) (result *restclient.Config, tearDownForCaller TearDownFunc, err error)

StartTestServer starts a etcd server and kube-apiserver. A rest client config and a tear-down func are returned.

Note: we return a tear-down func instead of a stop channel because the later will leak temporariy

files that becaues Golang testing's call to os.Exit will not give a stop channel go routine
enough time to remove temporariy files.

func StartTestServerOrDie

func StartTestServerOrDie(t *testing.T) (*restclient.Config, TearDownFunc)

StartTestServerOrDie calls StartTestServer with up to 5 retries on bind error and dies with t.Fatal if it does not succeed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL