Documentation ¶
Index ¶
- func ConvertCRD(pathToYaml string) (*apiextensionsv1beta1.CustomResourceDefinition, error)
- func ConvertClusterRole(pathToYaml string) (*rbacv1.ClusterRole, error)
- func ConvertClusterRoleBinding(pathToYaml string) (*rbacv1.ClusterRoleBinding, error)
- func ConvertDeployment(pathToYaml string) (*appsv1beta1.Deployment, error)
- func ConvertHabitat(pathToYaml string) (*habv1beta1.Habitat, error)
- func ConvertRole(pathToYaml string) (*rbacv1.Role, error)
- func ConvertRoleBinding(pathToYaml string) (*rbacv1.RoleBinding, error)
- func ConvertSecret(pathToYaml string) (*v1.Secret, error)
- func ConvertService(pathToYaml string) (*v1.Service, error)
- func ConvertServiceAccount(pathToYaml string) (*apiv1.ServiceAccount, error)
- func QueryService(url string) (string, error)
- type Framework
- func (f *Framework) CreateHabitat(habitat *habv1beta1.Habitat) error
- func (f *Framework) DeleteCRD(name string) error
- func (f *Framework) DeleteHabitat(habitatName string, ns string) error
- func (f *Framework) DeleteNamespace() error
- func (f *Framework) DeleteService(service string) error
- func (f *Framework) GetLoadBalancerIP(serviceName string) (string, error)
- func (f *Framework) WaitForEndpoints(habitatName string) error
- func (f *Framework) WaitForResources(labelName, habitatName string, numPods int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertCRD ¶ added in v0.8.0
func ConvertCRD(pathToYaml string) (*apiextensionsv1beta1.CustomResourceDefinition, error)
ConvertCRD takes in a path to the YAML file containing the manifest. It converts the file to the CustomResourceDefinition object.
func ConvertClusterRole ¶ added in v0.8.0
func ConvertClusterRole(pathToYaml string) (*rbacv1.ClusterRole, error)
ConvertClusterRole takes in a path to the YAML file containing the manifest. It converts the file to the ClusterRole object.
func ConvertClusterRoleBinding ¶ added in v0.8.0
func ConvertClusterRoleBinding(pathToYaml string) (*rbacv1.ClusterRoleBinding, error)
ConvertClusterRoleBinding takes in a path to the YAML file containing the manifest. It converts the file to the ClusterRoleBinding object.
func ConvertDeployment ¶
func ConvertDeployment(pathToYaml string) (*appsv1beta1.Deployment, error)
ConvertDeployment takes in a path to the YAML file containing the manifest. It converts the file to the Deployment object.
func ConvertHabitat ¶
func ConvertHabitat(pathToYaml string) (*habv1beta1.Habitat, error)
ConvertHabitat takes in a path to the YAML file containing the manifest. It converts the file to the Habitat object.
func ConvertRole ¶ added in v0.8.0
ConvertRole takes in a path to the YAML file containing the manifest. It converts the file to the Role object.
func ConvertRoleBinding ¶ added in v0.8.0
func ConvertRoleBinding(pathToYaml string) (*rbacv1.RoleBinding, error)
ConvertRoleBinding takes in a path to the YAML file containing the manifest. It converts the file to the RoleBinding object.
func ConvertSecret ¶
ConvertSecret takes in a path to the YAML file containing the manifest. It converts the file to the Secret object.
func ConvertService ¶
ConvertService takes in a path to the YAML file containing the manifest. It converts the file to the Service object.
func ConvertServiceAccount ¶ added in v0.8.0
func ConvertServiceAccount(pathToYaml string) (*apiv1.ServiceAccount, error)
ConvertServiceAccount takes in a path to the YAML file containing the manifest It converts it from that file to the ServiceAccount object.
func QueryService ¶
QueryService makes an HTTP GET request to `url` and returns the body.
Types ¶
type Framework ¶
type Framework struct { Image string KubeClient kubernetes.Interface APIExtensionsClient apiextensionsclient.Interface Client *habclient.HabitatV1beta1Client ExternalIP string Namespace string }
func Setup ¶
Setup sets up the test Framework object by creating essential clients needed to talk to the Kubernetes API server.
func (*Framework) CreateHabitat ¶
func (f *Framework) CreateHabitat(habitat *habv1beta1.Habitat) error
CreateHabitat creates a Habitat resource in cluster.
func (*Framework) DeleteHabitat ¶
DeleteHabitat deletes a Habitat as a user would.
func (*Framework) DeleteNamespace ¶ added in v0.8.0
DeleteNamespace deletes the namespace that is stored in the Framework object while it's initialization
func (*Framework) DeleteService ¶
DeleteService delete a Kubernetes service provided.
func (*Framework) GetLoadBalancerIP ¶ added in v0.7.0
GetLoadBalancerIP waits for Load Balancer IP to become available and returns it
func (*Framework) WaitForEndpoints ¶
func (*Framework) WaitForResources ¶
WaitForResources waits until numPods are in the "Running" state. We wait for pods, because those take the longest to create. Waiting for anything else would be already testing.