Documentation ¶
Index ¶
- func CleanupServiceAndPod(pod *kapi.Pod, service *kapi.Service, ns string)
- func CreateNewProject(clusterAdminClient *client.Client, clientConfig kclient.Config, ...) (*client.Client, error)
- func CreatePodFromImage(repo *imageapi.ImageRepository, ns string) *kapi.Pod
- func CreateSampleImageRepository(namespace string) *imageapi.ImageRepository
- func CreateServiceForPod(pod *kapi.Pod, ns string) *kapi.Service
- func DeleteAllEtcdKeys()
- func DeleteSampleImageRepository(repo *imageapi.ImageRepository, namespace string)
- func GetBaseDir() string
- func GetBuildFixture(filename string) *buildapi.Build
- func GetClusterAdminClient(adminKubeConfigFile string) (*client.Client, error)
- func GetClusterAdminClientConfig(adminKubeConfigFile string) (*kclient.Config, error)
- func GetClusterAdminKubeClient(adminKubeConfigFile string) (*kclient.Client, error)
- func GetEtcdURL() string
- func KubeConfigPath() string
- func Namespace() string
- func NewDockerClient() (*dockerClient.Client, error)
- func NewEtcdClient() *etcd.Client
- func RandomNamespace(prefix string) string
- func RequireDocker()
- func RequireEtcd()
- func RequireServer()
- func StartTestAllInOne() (*configapi.MasterConfig, string, error)
- func StartTestMaster() (*configapi.MasterConfig, string, error)
- func VerifyImage(repo *imageapi.ImageRepository, ns string, validator ValidateFunc) error
- func WaitForAddress(pod *kapi.Pod, service *kapi.Service, ns string) (string, error)
- type ValidateFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupServiceAndPod ¶ added in v0.4.2
CleanupServiceAndPod removes the Service and the Pod
func CreateNewProject ¶ added in v0.4.2
func CreateNewProject(clusterAdminClient *client.Client, clientConfig kclient.Config, projectName, adminUser string) (*client.Client, error)
CreateNewProject creates a new project using the clusterAdminClient, then gets a token for the adminUser and returns back a client for the admin user
func CreatePodFromImage ¶ added in v0.4.2
func CreatePodFromImage(repo *imageapi.ImageRepository, ns string) *kapi.Pod
CreatePodFromImage creates a Pod from the latest image available in the Image Repository
func CreateSampleImageRepository ¶ added in v0.4.2
func CreateSampleImageRepository(namespace string) *imageapi.ImageRepository
CreateSampleImageRepository creates a ImageRepository in given namespace
func CreateServiceForPod ¶ added in v0.4.2
CreateServiceForPod creates a service to serve the provided Pod
func DeleteAllEtcdKeys ¶ added in v0.4.2
func DeleteAllEtcdKeys()
DeleteAllEtcdKeys removes all etcd keys
func DeleteSampleImageRepository ¶ added in v0.4.2
func DeleteSampleImageRepository(repo *imageapi.ImageRepository, namespace string)
DeleteSampleImageRepository removes the ImageRepository created in given namespace
func GetBaseDir ¶ added in v0.4.2
func GetBaseDir() string
GetBaseDir returns the base directory used for test.
func GetBuildFixture ¶ added in v0.4.2
GetBuildFixture reads the Build JSON and returns and Build object
func GetClusterAdminClient ¶ added in v0.4.2
func GetClusterAdminClientConfig ¶ added in v0.4.2
func GetClusterAdminKubeClient ¶ added in v0.4.2
func GetEtcdURL ¶ added in v0.4.2
func GetEtcdURL() string
func KubeConfigPath ¶ added in v0.4.2
func KubeConfigPath() string
func Namespace ¶ added in v0.4.2
func Namespace() string
Namespace returns the test namespace. The default namespace is set to 'integration-test'. You can override it by setting the 'OS_TEST_NAMESPACE' environment variable
func NewDockerClient ¶ added in v0.4.2
func NewDockerClient() (*dockerClient.Client, error)
newDockerClient creates a docker client using the env var DOCKER_ENDPOINT or, if not supplied, uses the default docker endpoint /var/run/docker.sock
func NewEtcdClient ¶ added in v0.4.2
func RandomNamespace ¶ added in v0.4.2
RandomNamespace provides random Kubernetes namespace name based on the UNIX timestamp. Optionally you can set the prefix.
func RequireDocker ¶ added in v0.4.2
func RequireDocker()
RequireDocker ensures that a new docker client can be created and that a ListImages command can be run on the client or it fails with glog.Fatal
func RequireEtcd ¶ added in v0.4.2
func RequireEtcd()
RequireEtcd verifies if the etcd is running and accessible for testing
func RequireServer ¶ added in v0.4.2
func RequireServer()
RequireServer verifies if the etcd, docker and the OpenShift server are available and you can successfully connected to them.
func StartTestAllInOne ¶ added in v0.4.2
func StartTestAllInOne() (*configapi.MasterConfig, string, error)
func StartTestMaster ¶ added in v0.4.2
func StartTestMaster() (*configapi.MasterConfig, string, error)
StartTestMaster starts up a test master and returns back the startOptions so you can get clients and certs
func VerifyImage ¶ added in v0.4.2
func VerifyImage(repo *imageapi.ImageRepository, ns string, validator ValidateFunc) error
VerifyImage verifies if the latest image in given ImageRepository is valid