Documentation ¶
Overview ¶
Package helper provides tools for e2e test.
Index ¶
- Variables
- func BuildKwokBinary(rootDir string) env.Func
- func BuildKwokImage(rootDir string, image string, builder string) env.Func
- func BuildKwokctlBinary(rootDir string) env.Func
- func CreateByKustomize(kustomizeDir string) env.Func
- func CreateCluster(p support.E2EClusterProvider, args ...string) env.Func
- func CreateNamespace(name string) env.Func
- func CreateNode(node *corev1.Node) features.Func
- func CreatePod(pod *corev1.Pod) features.Func
- func DeleteByKustomize(kustomizeDir string) env.Func
- func DeleteNamespace(name string) env.Func
- func DeleteNode(node *corev1.Node) features.Func
- func DeletePod(pod *corev1.Pod) features.Func
- func DestroyCluster(p support.E2EClusterProvider) env.Func
- func Environment() env.Environment
- func ExportLogs(p support.E2EClusterProvider, dest string) env.Func
- func WaitForAllNodesReady() env.Func
- func WaitForAllPodsReady() env.Func
- type NodeBuilder
- type PodBuilder
Constants ¶
This section is empty.
Variables ¶
var BinSuffix string
BinSuffix is the suffix for binaries on Windows
Functions ¶
func BuildKwokBinary ¶
BuildKwokBinary builds the kwok binary and returns a function that can be used
func BuildKwokImage ¶
BuildKwokImage builds the kwok image and returns a function that can be used
func BuildKwokctlBinary ¶
BuildKwokctlBinary builds the kwokctl binary and returns a function that can be used
func CreateByKustomize ¶
CreateByKustomize applies kustomize to the cluster
func CreateCluster ¶
func CreateCluster(p support.E2EClusterProvider, args ...string) env.Func
CreateCluster creates a cluster
func CreateNamespace ¶
CreateNamespace creates a namespace
func CreateNode ¶
CreateNode creates a node and waits for it to be ready
func DeleteByKustomize ¶
DeleteByKustomize deletes kustomize from the cluster
func DeleteNamespace ¶
DeleteNamespace deletes a namespace
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 ¶
WaitForAllNodesReady waits for all nodes to be ready
func WaitForAllPodsReady ¶
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) WithAnnotation ¶ added in v0.6.0
func (b NodeBuilder) WithAnnotation(key, value string) *NodeBuilder
WithAnnotation will set annotation for 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) WithAnnotation ¶ added in v0.6.0
func (b PodBuilder) WithAnnotation(key, value string) *PodBuilder
WithAnnotation will set annotation for 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.