e2e

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package e2e holds an end-to-end test framework for testing the operator. The goal is for it to deploy the operator and some custom resources in to a kubernetes cluster, and observe that a reachable ETCD cluster is created. Flags include:

  • `--kind': starts a local Kind cluster to run the tests against
  • `--current-context': runs the tests against the local kubernetes context. This context must contain a running operator & have custom resource definitions applied.
  • `--repo-root': path to the root of the etcd-cluster-operator repo.
  • `--cleanup': defaulting to true, specifies if the Kind cluster should be automatically destroyed when the test finishes. It can be useful to disable this to debug why the e2e tests are failing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAllTestNamespaces added in v0.2.0

func DeleteAllTestNamespaces(t *testing.T, kubectl *kubectlContext)

func NamespaceForTest

func NamespaceForTest(t *testing.T, kubectl *kubectlContext, rl corev1.ResourceList) (string, func())

NamespaceForTest creates a new namespace with a name derived from the current running test. It adds a label, so that all such namespaces can easily be found. And if a namespace with that label already exists, it deletes it first to cleanup any resources left over from the previous test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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