Documentation ¶
Overview ¶
Package framework sets up the test framework needed to run the end-to-end tests on Kubernetes.
Index ¶
- Constants
- func ConvertDeployment(pathToYaml string) (*appsv1beta1.Deployment, error)
- func ConvertHabitat(pathToYaml string) (*habv1beta1.Habitat, error)
- func ConvertSecret(pathToYaml string) (*v1.Secret, error)
- func ConvertService(pathToYaml string) (*v1.Service, error)
- func QueryService(url string) (string, error)
- type Framework
- func (f *Framework) CreateHabitat(habitat *habv1beta1.Habitat) error
- func (f *Framework) DeleteHabitat(habitatName string) 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 ¶
const (
TestNs = "testing-v1beta1"
)
Variables ¶
This section is empty.
Functions ¶
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 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 QueryService ¶
QueryService makes an HTTP GET request to `url` and returns the body.
Types ¶
type Framework ¶
type Framework struct { Image string KubeClient kubernetes.Interface Client habclient.HabitatInterface ExternalIP string }
func (*Framework) CreateHabitat ¶
func (f *Framework) CreateHabitat(habitat *habv1beta1.Habitat) error
CreateHabitat creates a Habitat.
func (*Framework) DeleteHabitat ¶
DeleteHabitat deletes a Habitat as a user would.
func (*Framework) DeleteService ¶
DeleteService delete a Kubernetes service provided.
func (*Framework) GetLoadBalancerIP ¶
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.