testframework

package
v3.8.0-alpha.1+incompa... Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorNoDefaultIP = errors.New("no suitable IP address")

ErrorNoDefaultIP is returned when no suitable non-loopback address can be found.

Functions

func ConfigFromFile

func ConfigFromFile(filename string) (*rest.Config, error)

func CreateProject

func CreateProject(clientConfig *rest.Config, namespace string, adminUser string) error

func DefaultLocalIP4

func DefaultLocalIP4() (net.IP, error)

DefaultLocalIP4 returns an IPv4 address that this host can be reached on. Will return NoDefaultIP if no suitable address can be found.

func FindFreeLocalPort

func FindFreeLocalPort() (int, error)

FindFreeLocalPort returns the number of an available port number on the loopback interface. Useful for determining the port to launch a server on. Error handling required - there is a non-zero chance that the returned port number will be bound by another process after this function returns.

k8s.io/kubernetes/test/integration/framework.FindFreeLocalPort

func StartTestRegistry

func StartTestRegistry(t *testing.T, kubeConfigPath string) (string, error)

func UserClientConfig

func UserClientConfig(clientConfig *rest.Config, token string) *rest.Config

func WaitHTTP

func WaitHTTP(rt http.RoundTripper, url string) error

func WaitTCP

func WaitTCP(addr string) error

Types

type MasterContainer

type MasterContainer struct {
	ID              string
	Port            int
	NetworkSettings struct {
		IPAddress string
	}
}

func StartMasterContainer

func StartMasterContainer(configDir string) (*MasterContainer, error)

func (*MasterContainer) Stop

func (c *MasterContainer) Stop() error

func (*MasterContainer) WaitHealthz

func (c *MasterContainer) WaitHealthz(configDir string) error

func (*MasterContainer) WriteConfigs

func (c *MasterContainer) WriteConfigs(configDir string) error

Jump to

Keyboard shortcuts

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