fixtures

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package fixtures implements fixtures for e2e tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBusyBoxPod

func BuildBusyBoxPod() *corev1.Pod

BuildBusyBoxPod returns the definition of a Pod that runs busybox and waits 5min before completing

func BuildCluster

func BuildCluster(name string) (*cluster.Cluster, error)

BuildCluster builds a cluster exposing port 32080 and with the required images preloaded

func BuildHttpbinPod

func BuildHttpbinPod() *corev1.Pod

BuildHttpbinPod returns the definition for deploying Httpbin as a Pod

func BuildHttpbinService

func BuildHttpbinService() *corev1.Service

BuildHttpbinService returns a Service definition that exposes httpbin pods at the node port 32080

func BuildNginxPod

func BuildNginxPod() *corev1.Pod

BuildNginxPod returns the definition of a Pod that runs Nginx

func BuildNginxService

func BuildNginxService() *corev1.Service

BuildNginxService returns the definition of a Service that exposes the nginx pod(s)

func BuildPausedPod

func BuildPausedPod() *corev1.Pod

BuildPausedPod returns the definition of a Pod that runs the paused image in a container creating a "no-op" dummy Pod.

func DeployApp

func DeployApp(
	k8s kubernetes.Kubernetes,
	ns string,
	pod *corev1.Pod,
	svc *corev1.Service,
	timeout time.Duration,
) error

DeployApp deploys a pod in a namespace and exposes it as a service in a cluster

func ExposeService

func ExposeService(k8s kubernetes.Kubernetes, ns string, svc *corev1.Service, timeout time.Duration) error

ExposeService exposes a service in the given namespace and waits for it to be ready

func RunPod

func RunPod(k8s kubernetes.Kubernetes, ns string, pod *corev1.Pod, timeout time.Duration) error

RunPod creates a pod and waits it for be running

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL