test/

directory
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0

README

Integration Tests

Tests that need a Kubernetes cluster with Steward installed.

Preparation

Prepare Test Namespace
STEWARD_TEST_NAMESPACE=$(kubectl create -f - -o name <<<'{ "apiVersion": "v1", "kind": "Namespace", "metadata": { "generateName": "steward-test-" } }')
export STEWARD_TEST_NAMESPACE=${STEWARD_TEST_NAMESPACE#*/}
Running Framework Tests

Framework tests test the test framework itself.

Running the test framework tests:

( cd framework && \
  kubectl -n "$STEWARD_TEST_NAMESPACE" delete secrets --all --ignore-not-found && \
  go test ./... -count=1 -tags=frameworktest -v -- --kubeconfig "$KUBECONFIG" )

Running Tests

Integration Tests
( cd integrationtest && \
  kubectl -n "$STEWARD_TEST_NAMESPACE" delete secrets --all --ignore-not-found && \
  go test ./... -count=1 -tags=e2e -run Test_PipelineRunSingle -v -- --kubeconfig "$KUBECONFIG" )
( cd crds && \
  kubectl -n "$STEWARD_TEST_NAMESPACE" delete secrets --all --ignore-not-found && \
  go test ./... -count=1 -tags=e2e -v -- --kubeconfig "$KUBECONFIG" )
Load Tests
( cd loadtest && \
  kubectl -n "$STEWARD_TEST_NAMESPACE" delete secrets --all --ignore-not-found && \
  go test ./... -count=1 -tags=loadtest -v -- --kubeconfig "$KUBECONFIG" )

Cleanup

kubectl delete namespace "$STEWARD_TEST_NAMESPACE"

Directories

Path Synopsis
crds

Jump to

Keyboard shortcuts

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