func init() { … } type TearDownFunc … type TestServer … // StartTestServer starts a cloud-controller-manager. A rest client config and a tear-down func, // and location of the tmpdir are returned. // // Note: we return a tear-down func instead of a stop channel because the later will leak temporary // 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(ctx context.Context, customFlags []string) (result TestServer, err error) { … } // StartTestServerOrDie calls StartTestServer panic if it does not succeed. func StartTestServerOrDie(ctx context.Context, flags []string) *TestServer { … } func createListenerOnFreePort() (net.Listener, int, error) { … }