Documentation ¶
Index ¶
- Constants
- func CleanupServiceAndPod(pod *kapi.Pod, service *kapi.Service, ns string)
- func CreateNamespace(clusterAdminKubeConfig, name string) (err error)
- func CreatePodFromImage(stream *imageapi.ImageStream, tag, ns string) *kapi.Pod
- func CreateServiceForPod(pod *kapi.Pod, ns string) *kapi.Service
- func DeleteAllEtcdKeys()
- func GetBaseDir() string
- func GetClientForServiceAccount(adminClient *kclient.Client, clientConfig kclient.Config, ...) (*client.Client, *kclient.Client, *kclient.Config, error)
- func GetClientForUser(clientConfig kclient.Config, username string) (*client.Client, *kclient.Client, *kclient.Config, error)
- 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 GetTemplateFixture(filename string) (*templateapi.Template, error)
- func KubeConfigPath() string
- func MakeNewEtcdClient() (newetcdclient.Client, error)
- func Namespace() string
- func NewDockerClient() (*dockerClient.Client, error)
- func NewEtcdClient() *etcd.Client
- func NewTestLDAPServer() *testLDAPServer
- func RandomNamespace(prefix string) string
- func RequireDocker()
- func RequireEtcd()
- func VerifyImage(stream *imageapi.ImageStream, tag, ns string, validator ValidateFunc) error
- func WaitForAddress(pod *kapi.Pod, service *kapi.Service, ns string) (string, error)
- func WaitForClusterPolicyUpdate(c *client.Client, verb, resource string, allowed bool) error
- func WaitForPolicyUpdate(c *client.Client, namespace, verb, resource string, allowed bool) error
- type ValidateFunc
Constants ¶
const ( PolicyCachePollInterval = 100 * time.Millisecond PolicyCachePollTimeout = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func CleanupServiceAndPod ¶ added in v0.4.2
CleanupServiceAndPod removes the Service and the Pod
func CreateNamespace ¶ added in v0.4.4
CreateNamespace creates a namespace with the specified name using the provided kubeconfig DO NOT USE, use create project instead
func CreatePodFromImage ¶ added in v0.4.2
func CreatePodFromImage(stream *imageapi.ImageStream, tag, ns string) *kapi.Pod
CreatePodFromImage creates a Pod from the latest image available in the Image Stream
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 GetBaseDir ¶ added in v0.4.2
func GetBaseDir() string
GetBaseDir returns the base directory used for test.
func GetClientForServiceAccount ¶ added in v1.0.7
func GetClientForUser ¶ added in v0.6.1
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 GetTemplateFixture ¶ added in v1.0.7
func GetTemplateFixture(filename string) (*templateapi.Template, error)
func KubeConfigPath ¶ added in v0.4.2
func KubeConfigPath() string
func MakeNewEtcdClient ¶ added in v1.1.3
func MakeNewEtcdClient() (newetcdclient.Client, error)
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 NewTestLDAPServer ¶ added in v1.0.2
func NewTestLDAPServer() *testLDAPServer
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 VerifyImage ¶ added in v0.4.2
func VerifyImage(stream *imageapi.ImageStream, tag, ns string, validator ValidateFunc) error
VerifyImage verifies if the latest image in given ImageStream is valid
func WaitForAddress ¶ added in v0.4.2
WaitForAddress waits for the Pod to be running and then for the Service to get the endpoint.
func WaitForClusterPolicyUpdate ¶ added in v1.0.6
WaitForClusterPolicyUpdate checks if the given client can perform the named verb and action. If PolicyCachePollTimeout is reached without the expected condition matching, an error is returned
func WaitForPolicyUpdate ¶ added in v1.0.1
WaitForPolicyUpdate checks if the given client can perform the named verb and action. If PolicyCachePollTimeout is reached without the expected condition matching, an error is returned