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 DeleteAndWaitForNamespaceTermination(c kclientset.Interface, name string) error
- func DumpEtcdOnFailure(t *testing.T)
- func GetBaseDir() string
- func GetClientForServiceAccount(adminClient kclientset.Interface, clientConfig restclient.Config, ...) (*client.Client, *kclientset.Clientset, *restclient.Config, error)
- func GetClientForUser(clientConfig restclient.Config, username string) (*client.Client, kclientset.Interface, *restclient.Config, error)
- func GetClusterAdminClient(adminKubeConfigFile string) (*client.Client, error)
- func GetClusterAdminClientConfig(adminKubeConfigFile string) (*restclient.Config, error)
- func GetClusterAdminKubeClient(adminKubeConfigFile string) (kclientset.Interface, error)
- func GetEtcdURL() string
- func GetImageFixture(filename string) (*imageapi.Image, error)
- func GetScopedClientForUser(adminClient *client.Client, clientConfig restclient.Config, username string, ...) (*client.Client, kclientset.Interface, *restclient.Config, error)
- func GetTemplateFixture(filename string) (*templateapi.Template, error)
- func KubeConfigPath() string
- func MakeNewEtcd3Client() (*etcdclientv3.Client, error)
- func MakeNewEtcdClient() (etcdclient.Client, error)
- func Namespace() string
- func NewDockerClient() (*dockerClient.Client, error)
- func NewEtcd3Client() *etcdclientv3.Client
- func NewEtcdClient() etcdclient.Client
- func NewTestLDAPServer() *testLDAPServer
- func RandomNamespace(prefix string) string
- func RequireDocker()
- func RequireEtcd(t *testing.T) *etcdtest.EtcdTestServer
- func RequireEtcd3(t *testing.T) (*etcdtest.EtcdTestServer, *storagebackend.Config)
- 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 string, resource schema.GroupResource, allowed bool) error
- func WaitForPolicyUpdate(c *client.Client, namespace, verb string, resource schema.GroupResource, ...) error
- func WaitForResourceQuotaLimitSync(client kcoreclient.ResourceQuotaInterface, name string, ...) error
- type ValidateFunc
Constants ¶
const ( PolicyCachePollInterval = 100 * time.Millisecond PolicyCachePollTimeout = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func CleanupServiceAndPod ¶
CleanupServiceAndPod removes the Service and the Pod
func CreateNamespace ¶
CreateNamespace creates a namespace with the specified name using the provided kubeconfig DO NOT USE, use create project instead
func CreatePodFromImage ¶
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 ¶
CreateServiceForPod creates a service to serve the provided Pod
func DeleteAndWaitForNamespaceTermination ¶ added in v1.1.5
func DeleteAndWaitForNamespaceTermination(c kclientset.Interface, name string) error
func DumpEtcdOnFailure ¶ added in v1.3.0
func GetClientForServiceAccount ¶ added in v1.0.7
func GetClientForServiceAccount(adminClient kclientset.Interface, clientConfig restclient.Config, namespace, name string) (*client.Client, *kclientset.Clientset, *restclient.Config, error)
func GetClientForUser ¶
func GetClientForUser(clientConfig restclient.Config, username string) (*client.Client, kclientset.Interface, *restclient.Config, error)
func GetClusterAdminClient ¶
func GetClusterAdminClientConfig ¶
func GetClusterAdminClientConfig(adminKubeConfigFile string) (*restclient.Config, error)
func GetClusterAdminKubeClient ¶
func GetClusterAdminKubeClient(adminKubeConfigFile string) (kclientset.Interface, error)
func GetEtcdURL ¶
func GetEtcdURL() string
func GetImageFixture ¶ added in v1.3.0
func GetScopedClientForUser ¶ added in v1.3.0
func GetScopedClientForUser(adminClient *client.Client, clientConfig restclient.Config, username string, scopes []string) (*client.Client, kclientset.Interface, *restclient.Config, error)
func GetTemplateFixture ¶ added in v1.0.7
func GetTemplateFixture(filename string) (*templateapi.Template, error)
func KubeConfigPath ¶
func KubeConfigPath() string
func MakeNewEtcd3Client ¶
func MakeNewEtcd3Client() (*etcdclientv3.Client, error)
func MakeNewEtcdClient ¶ added in v1.1.3
func MakeNewEtcdClient() (etcdclient.Client, error)
func Namespace ¶
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 ¶
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 NewEtcd3Client ¶
func NewEtcd3Client() *etcdclientv3.Client
func NewEtcdClient ¶
func NewEtcdClient() etcdclient.Client
func NewTestLDAPServer ¶ added in v1.0.2
func NewTestLDAPServer() *testLDAPServer
func RandomNamespace ¶
RandomNamespace provides random Kubernetes namespace name based on the UNIX timestamp. Optionally you can set the prefix.
func RequireDocker ¶
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 ¶
func RequireEtcd(t *testing.T) *etcdtest.EtcdTestServer
RequireEtcd verifies if the etcd is running and accessible for testing
func RequireEtcd3 ¶
func RequireEtcd3(t *testing.T) (*etcdtest.EtcdTestServer, *storagebackend.Config)
func VerifyImage ¶
func VerifyImage(stream *imageapi.ImageStream, tag, ns string, validator ValidateFunc) error
VerifyImage verifies if the latest image in given ImageStream is valid
func WaitForAddress ¶
WaitForAddress waits for the Pod to be running and then for the Service to get the endpoint.
func WaitForClusterPolicyUpdate ¶ added in v1.0.6
func WaitForClusterPolicyUpdate(c *client.Client, verb string, resource schema.GroupResource, allowed bool) error
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
func WaitForPolicyUpdate(c *client.Client, namespace, verb string, resource schema.GroupResource, allowed bool) error
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
func WaitForResourceQuotaLimitSync ¶ added in v1.3.0
func WaitForResourceQuotaLimitSync( client kcoreclient.ResourceQuotaInterface, name string, hardLimit kapi.ResourceList, timeout time.Duration, ) error
WaitForResourceQuotaSync watches given resource quota until its hard limit is updated to match the desired spec or timeout occurs.