Documentation ¶
Overview ¶
Package helper provides utilities to assist with osde2e testing.
Index ¶
- type H
- func (h *H) Cfg() config.Interface
- func (h *H) Cleanup()
- func (h *H) CurrentProject() string
- func (h *H) Dynamic() dynamic.Interface
- func (h *H) GetClusterState() (resources map[schema.GroupVersionResource]*unstructured.UnstructuredList)
- func (h *H) GiveCurrentProjectClusterAdmin()
- func (h *H) Image() image.Interface
- func (h *H) Kube() kubernetes.Interface
- func (h *H) Project() project.Interface
- func (h *H) REST() *rest.RESTClient
- func (h *H) Route() route.Interface
- func (h *H) Runner(cmd string) *runner.Runner
- func (h *H) Setup()
- func (h *H) WaitForEndpointReady(svc *kubev1.Service, n int, dur time.Duration) error
- func (h *H) WaitForPodPhase(pod *kubev1.Pod, target kubev1.PodPhase, n int, dur time.Duration) (phase kubev1.PodPhase)
- func (h *H) WriteResults(results map[string][]byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type H ¶
type H struct { // embed test configuration *config.Config // contains filtered or unexported fields }
H configures clients and sets up and destroys Projects for test isolation.
func (*H) CurrentProject ¶
CurrentProject returns the project being used for testing.
func (*H) GetClusterState ¶
func (h *H) GetClusterState() (resources map[schema.GroupVersionResource]*unstructured.UnstructuredList)
GetClusterState retrieves the current objects in desiredClusterResources and desiredResources.
func (*H) GiveCurrentProjectClusterAdmin ¶
func (h *H) GiveCurrentProjectClusterAdmin()
GiveCurrentProjectClusterAdmin to default service account and ensure its removed after project deletion.
func (*H) Kube ¶
func (h *H) Kube() kubernetes.Interface
Kube returns the clientset for Kubernetes upstream.
func (*H) Runner ¶
Runner creates an extended test suite runner and configure RBAC for it and runs cmd in it.
func (*H) Setup ¶
func (h *H) Setup()
Setup configures a *rest.Config using the embedded kubeconfig then sets up a Project for tests to run in.
func (*H) WaitForEndpointReady ¶
WaitForEndpointReady until Endpoint for svc is ready, checking n times and sleeping dur between them.
func (*H) WaitForPodPhase ¶
func (h *H) WaitForPodPhase(pod *kubev1.Pod, target kubev1.PodPhase, n int, dur time.Duration) (phase kubev1.PodPhase)
WaitForPodPhase until in target, checking n times and sleeping dur between them. Last known phase is returned.
func (*H) WriteResults ¶
WriteResults dumps runner results into the ReportDir.