e2e

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

README

Running e2e tests on Kedge

The e2e tests leverages on go testing package to run tests. In these tests, we execute kedge create on Kubernetes and OpenShift cluster with examples provided under docs/examples.

Pre-requisites
kubectl

Both kubernetes and OpenShift tests rely on kubectl for validation. You need to have kubectl installed before running the tests.

Running Kubernetes tests
  1. For running the Kubernetes tests, you need a kubernetes cluster up and running. Minikube is a simplest way to do that.

  2. Run make test-e2e to execute the test.

  3. You can also provide the following options while running the tests:

    • PARALLEL=<value>: no of tests to run in parallel

    • TIMEOUT=<value> : the maximum time for which the tests could run after which the tests timeout

    • VERBOSE=yes : verbose mode

Example usage: PARALLEL=3 TIMEOUT=10m VERBOSE=yes make test-e2e

Running OpenShift tests
  1. Install OpenShift client tools OpenShift client tools

  2. For running the OpenShift tests, you need an OpenShift cluster up and running with Minishift or oc cluster up

  3. Run make test-e2e-os to execute the tests. You can also provide values for PARALLEL, TIMEOUT, VERBOSE option as mentioned under Kubernetes tests.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BinaryCommand = []string{"create", "-n"}
View Source
var BinaryLocation = ProjectPath + "kedge"
View Source
var ProjectPath = "$GOPATH/src/github.com/kedgeproject/kedge/"

Hardcoding the location of the binary, which is in root of project directory

View Source
var TestPath = "docs/examples/"

Functions

func PodsStarted

func PodsStarted(t *testing.T, clientset *kubernetes.Clientset, namespace string, podNames []string) error

Check to see if specific pods have been started

func RunBinary

func RunBinary(files []string, namespace string) ([]byte, error)

Run the binary against the Kubernetes cluster using a specified command against a specific namespace requirement: your binary must have a --namespace parameter to specify a namespace location as well as -f to specific a file. Ex: command --namespace foobar -f foo.yaml -f bar.yaml

Types

type ServicePort

type ServicePort struct {
	Name string
	Port int32
}

These structs create a specific name as well as port to ping

Jump to

Keyboard shortcuts

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