Skip to content

Running testsuite on Quickstart Kind

Petr Hála edited this page May 27, 2024 · 8 revisions

These are the minimal steps required to execute kuadrant tests on top of local quickstart deployment.

Prerequisites

  • https://docs.kuadrant.io/0.7.0/getting-started-single-cluster/
  • AWS Hosted zone configured for the tests needs to have TTL of 1, even for negative caching
    • This is to ensure that the changes are propagated as quickly as possible and there is less waiting
    • Negative caching TTL of 1 is also required for the same reason

Steps

  • Deploy tools. This deploys basic external dependencies of our testsuite, namely Keycloak and Mockserver
kubectl create ns tools
kubectl apply -k https://github.com/3scale-qe/tools.git/overlays/kuadrant -n tools
  • Create required namespaces. While possible, we do not run tests in kuadrant-system and rather use separate namespaces for test runtime. This helps with identifying what was already deployed by a cluster-admin (kuadrant-system) and what the user actually deployed (kuadrant, kuadrant2)
kubectl create ns kuadrant
kubectl create ns kuadrant2
  • Copy ManagedZone. Managed zone is bound to the specific namespace, so we need to copy it to the actual namespace we will use in tests
kubectl get secret/aws-credentials --namespace=kuadrant-system -o yaml | sed 's/namespace: .*/namespace: kuadrant/' | kubectl apply -f -
kubectl get managedzone/dev-mz --namespace=kuadrant-system -o yaml | sed 's/namespace: .*/namespace: kuadrant/' | kubectl apply -f -
  • Run testsuite
sudo docker run \
    --net=host \
    -v $HOME/.kube/config:/run/kubeconfig:z \
    -e KUADRANT_DEFAULT_EXPOSER=kind \
    -e KUADRANT_CONTROL_PLANE__MANAGEDZONE=dev-mz \
    -e KUADRANT_CONTROL_PLANE__ISSUER__NAME=kuadrant-operator-glbc-ca \
    quay.io/kuadrant/testsuite:latest \
    kuadrant
Clone this wiki locally