fixtures

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 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, ports ...cluster.NodePort) (*cluster.Cluster, error)

BuildCluster builds a cluster with the xk6-disruptor-agent image preloaded and the given node ports exposed

func BuildGrpcbinService added in v0.2.0

func BuildGrpcbinService(nodePort uint) *corev1.Service

BuildGrpcbinService returns a Service definition that exposes grpcbin pods at the node port 30000

func BuildGrpcpbinPod added in v0.2.0

func BuildGrpcpbinPod() *corev1.Pod

BuildGrpcpbinPod returns the definition for deploying grpcbin as a Pod

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

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