helper

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package helper provides tools for e2e test.

Index

Constants

This section is empty.

Variables

View Source
var BinSuffix string

BinSuffix is the suffix for binaries on Windows

Functions

func BuildKwokBinary

func BuildKwokBinary(rootDir string) env.Func

BuildKwokBinary builds the kwok binary and returns a function that can be used

func BuildKwokImage

func BuildKwokImage(rootDir string, image string, builder string) env.Func

BuildKwokImage builds the kwok image and returns a function that can be used

func BuildKwokctlBinary

func BuildKwokctlBinary(rootDir string) env.Func

BuildKwokctlBinary builds the kwokctl binary and returns a function that can be used

func CreateByKustomize

func CreateByKustomize(kustomizeDir string) env.Func

CreateByKustomize applies kustomize to the cluster

func CreateCluster

func CreateCluster(p support.E2EClusterProvider, args ...string) env.Func

CreateCluster creates a cluster

func CreateNamespace

func CreateNamespace(name string) env.Func

CreateNamespace creates a namespace

func CreateNode

func CreateNode(node *corev1.Node) features.Func

CreateNode creates a node and waits for it to be ready

func CreatePod

func CreatePod(pod *corev1.Pod) features.Func

CreatePod creates a pod and waits for it to be ready

func DeleteByKustomize

func DeleteByKustomize(kustomizeDir string) env.Func

DeleteByKustomize deletes kustomize from the cluster

func DeleteNamespace

func DeleteNamespace(name string) env.Func

DeleteNamespace deletes a namespace

func DeleteNode

func DeleteNode(node *corev1.Node) features.Func

DeleteNode deletes a node

func DeletePod

func DeletePod(pod *corev1.Pod) features.Func

DeletePod deletes a pod

func DestroyCluster

func DestroyCluster(p support.E2EClusterProvider) env.Func

DestroyCluster destroys a cluster

func Environment

func Environment() env.Environment

Environment returns an environment of the test

func ExportLogs

func ExportLogs(p support.E2EClusterProvider, dest string) env.Func

ExportLogs exports logs from a cluster

func WaitForAllNodesReady

func WaitForAllNodesReady() env.Func

WaitForAllNodesReady waits for all nodes to be ready

func WaitForAllPodsReady

func WaitForAllPodsReady() env.Func

WaitForAllPodsReady waits for all pods to be ready

Types

type NodeBuilder

type NodeBuilder struct {
	// contains filtered or unexported fields
}

NodeBuilder is a builder to build a node.

func NewNodeBuilder

func NewNodeBuilder(name string) *NodeBuilder

NewNodeBuilder will create a node builder.

func (NodeBuilder) Build

func (b NodeBuilder) Build() *corev1.Node

Build will build a node.

func (NodeBuilder) WithPodCIDR

func (b NodeBuilder) WithPodCIDR(podCIDR string) *NodeBuilder

WithPodCIDR will set podCIDR for node.

type PodBuilder

type PodBuilder struct {
	// contains filtered or unexported fields
}

PodBuilder is a builder for pod.

func NewPodBuilder

func NewPodBuilder(name string) *PodBuilder

NewPodBuilder will create a pod builder.

func (PodBuilder) Build

func (b PodBuilder) Build() *corev1.Pod

Build will build a pod.

func (PodBuilder) WithHostNetwork

func (b PodBuilder) WithHostNetwork(hostNetwork bool) *PodBuilder

WithHostNetwork will set host network for pod.

func (PodBuilder) WithNamespace

func (b PodBuilder) WithNamespace(namespace string) *PodBuilder

WithNamespace will set namespace for pod.

func (PodBuilder) WithNodeName

func (b PodBuilder) WithNodeName(nodeName string) *PodBuilder

WithNodeName will set node name for pod.

Jump to

Keyboard shortcuts

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