Console Backend Service Test


This project includes acceptance tests for a Console Backend Service project.


Use the following tools to set up the project:


Install dependencies

This project uses dep as a dependency manager. To install all required dependencies, use the following command:

dep ensure -vendor-only
Run tests outside the cluster

Before you run the acceptance tests, export required environment variables with the following command:

export KUBECONFIG=/Users/${USER}/.kube/config && export ADMIN_EMAIL=$(kubectl get secret admin-user -n kyma-system -o jsonpath="{}" | base64 --decode) && export ADMIN_PASSWORD=$(kubectl get secret admin-user -n kyma-system -o jsonpath="{.data.password}" | base64 --decode) && export READ_ONLY_USER_PASSWORD=$(kubectl get secret test-read-only-user -n kyma-system -o jsonpath="{.data.password}" | base64 --decode) && export READ_ONLY_USER_EMAIL=$(kubectl get secret test-read-only-user -n kyma-system -o jsonpath="{}" | base64 --decode) && export NO_RIGHTS_USER_PASSWORD=$(kubectl get secret test-no-rights-user -n kyma-system -o jsonpath="{.data.password}" | base64 --decode) && export NO_RIGHTS_USER_EMAIL=$(kubectl get secret test-no-rights-user -n kyma-system -o jsonpath="{}" | base64 --decode) && export TEST_TESTING_ADDONS_URL=""

Run acceptance tests using the following command:

  • against the Console Backend Service deployed on the local cluster:

    go test ./... -tags=acceptance -v -count=1 -p=1
  • against standalone Console Backend Service deployed on the local host:

    GRAPHQL_ENDPOINT=http://localhost:3000/graphql go test ./... -tags=acceptance -v -count=1 -p=1
  • against the Console Backend Service deployed on the cluster with custom domain: go test ./... -tags=acceptance -v -count=1 -p=1
Verify the code

To check if the code is correct and you can push it, run the script. It builds the application, runs tests, checks the status of the vendored libraries, runs the static code analysis, and ensures that the formatting of the code is correct.




View Source
const (
	DefaultSubscriptionTimeout = 5 * time.Second
	DefaultReadyTimeout        = time.Minute * 3
	DefaultDeletionTimeout     = time.Minute * 3
	TestLabelKey               = "testName"
	TestLabelValue             = "console-backend-service-test"


This section is empty.


This section is empty.


This section is empty.

Source Files