The tests/ directory contains an E2E test suite for the AI Rolling Demo UI. Those tests are also used by our nightly CI run (.github/workflows/nightly.yml) and by our CI PR check (.github/workflows/ci-pr-check.yaml).
A user is also able to run our testing suite locally (make ci-install && make ci-tests). This will spin up a local Kind cluster, deploy RHDH via Helm, and then run the same E2E suite. This way local changes can be tested before pushed on the github repo.
kindv0.23.0+helmv3+kubectlopensslpythonversion greater than3.11.- uv installed (
pip install uvor via the official installer). sudoaccess (the script writes to/etc/hosts)
ci-setup.sh automatically sources scripts/private-env. Make sure your file has the following environment variables exported. For more details check the docs/SETUP_GUIDE.md#setup-the-private-env-file section.
# Keycloak / OIDC
export KEYCLOAK_METADATA_URL="https://<host>/realms/<realm>/.well-known/openid-configuration"
export KEYCLOAK_BASE_URL="https://<host>"
export KEYCLOAK_REALM="<realm>"
export KEYCLOAK_LOGIN_REALM="<login-realm>"
export KEYCLOAK_CLIENT_ID="<client-id>"
export KEYCLOAK_CLIENT_SECRET="<client-secret>"
# Optional: If you don't have QUAY_DOCKERCONFIGJSON already exported in your private-env
# you can just export a dummy value like the one below
export QUAY_DOCKERCONFIGJSON='{"auths":{"quay.io":{"auth":""}}}'
# Lightspeed inference backend
export VLLM_URL="https://<vllm-host>"
export VLLM_API_KEY="<api-key>"
export VALIDATION_PROVIDER="<provider>"
export VALIDATION_MODEL_NAME="<model>"
# Notebooks
export NOTEBOOKS_QUERY_PROVIDER_ID="<provider-id>"
export NOTEBOOKS_QUERY_MODEL="<model>"
# Lightspeed PostgreSQL
export LIGHTSPEED_POSTGRES_USER="<user>"
export LIGHTSPEED_POSTGRES_PASSWORD="<password>"
export LIGHTSPEED_POSTGRES_DB="<db-name>"
# GitHub App integration
export GITHUB_APP_APP_ID="<app-id>"
export GITHUB_APP_CLIENT_ID="<client-id>"
export GITHUB_APP_CLIENT_SECRET="<client-secret>"
export GITHUB_APP_WEBHOOK_URL="https://<webhook-host>"
export GITHUB_APP_WEBHOOK_SECRET="<webhook-secret>"
export GITHUB_APP_PRIVATE_KEY="<pem-key>"
export GITOPS_GIT_ORG="<github-org>"
# ArgoCD credentials
# For Kind cluster testing, set real values from "ArgoCD Devcluster Test User Creds" in the team Bitwarden.
# To run against the actual devcluster, these can be left empty.
export ARGOCD_APP_NAME="rolling-demo"
export ARGOCD_USER="<user>" # see "ArgoCD Devcluster Test User Creds" on team Bitwarden
export ARGOCD_PASSWORD="<password>" # see "ArgoCD Devcluster Test User Creds" on team Bitwarden
export ARGOCD_HOSTNAME="<hostname>" # see "ArgoCD Devcluster Test User Creds" on team Bitwarden
export ARGOCD_API_TOKEN="<token>" # see "ArgoCD Devcluster Test User Creds" on team Bitwarden
# E2E test identity: ROLLING_DEMO_TEST_USERNAME is an important
# value. You can use your own keycloak username as a test user.
# The script will just impersonate your user while testing your
# local changes on a Kind cluster.
export ROLLING_DEMO_TEST_USERNAME="<keycloak-username>"
export RHDH_ENVIRONMENT="production"Note: The RHDH_CLUSTER_ROUTER_BASE is overriden automatically by ci-setup.sh in testing mode, so the scripts/private-env value is ignored. The value used for testing is apps.testing
make ci-install # creates Kind cluster and deploys RHDH (~40 min)
make ci-tests # runs the Playwright E2E suiteTo tear down the cluster afterwards:
kind delete cluster --name rhdh-ciThe CI PR check workflow (.github/workflows/ci-pr-check.yaml) reads the same variables from GitHub Actions secrets. Add the following secrets in Settings → Secrets and variables → Actions.
Note on GitHub App secret names: GitHub Actions reserves the
GITHUB_*namespace, so the workflow usesGH_APP_*names instead (e.g.GH_APP_APP_IDinstead ofGITHUB_APP_APP_ID).ci-setup.shmaps both names automatically, so locally you keep using theGITHUB_APP_*variables in yourprivate-env.
| Secret | Description |
|---|---|
KEYCLOAK_METADATA_URL |
OIDC discovery URL |
KEYCLOAK_BASE_URL |
Keycloak base URL |
KEYCLOAK_REALM |
Realm name |
KEYCLOAK_LOGIN_REALM |
Login realm (often master) |
KEYCLOAK_CLIENT_ID |
OIDC client ID |
KEYCLOAK_CLIENT_SECRET |
OIDC client secret |
QUAY_DOCKERCONFIGJSON |
Quay pull secret (raw JSON) |
VLLM_URL |
vLLM endpoint URL |
VLLM_API_KEY |
vLLM API key |
VALIDATION_PROVIDER |
Validation provider name |
VALIDATION_MODEL_NAME |
Validation model name |
LIGHTSPEED_POSTGRES_USER |
Lightspeed DB username |
LIGHTSPEED_POSTGRES_PASSWORD |
Lightspeed DB password |
LIGHTSPEED_POSTGRES_DB |
Lightspeed DB name |
NOTEBOOKS_QUERY_PROVIDER_ID |
Notebooks query provider ID |
NOTEBOOKS_QUERY_MODEL |
Notebooks query model |
GH_APP_APP_ID |
GitHub App ID (maps to GITHUB_APP_APP_ID) |
GH_APP_CLIENT_ID |
GitHub App client ID |
GH_APP_CLIENT_SECRET |
GitHub App client secret |
GH_APP_WEBHOOK_URL |
GitHub App webhook URL |
GH_APP_WEBHOOK_SECRET |
GitHub App webhook secret |
GH_APP_PRIVATE_KEY |
GitHub App private key (PEM) |
GITOPS_GIT_ORG |
GitHub org for GitOps repos |
ARGOCD_USER |
ArgoCD username |
ARGOCD_PASSWORD |
ArgoCD password |
ARGOCD_HOSTNAME |
ArgoCD hostname |
ARGOCD_API_TOKEN |
ArgoCD API token |
ROLLING_DEMO_TEST_USERNAME |
Keycloak username used by E2E tests |
RHDH_ENVIRONMENT |
Environment label passed to tests (e.g. ci) |
-
Test suite fails on first
test_navbar.pytest: If Kind cluster is created successfully but then your tests are failing when an authenticated session is required (e.g.test_navbarwhich is the first group of tests ran where auth is required), you have most probably haven't exported correctly the variables mentioned in Preparescripts/private-env. -
Tests hit wrong RHDH URL (e.g. your OCP cluster's hostname instead of
rhdh-ci.apps.testing): This usually meansRHDH_BASE_URLwas set to a custom value before runningmake ci-tests. The CI scripts deriveRHDH_BASE_URLfromCI_HOSTNAME(default:rhdh-ci.apps.testing). Do not setRHDH_BASE_URLmanually when running local CI tests — unset it and letrun-tests.shcompute it. Note thatRHDH_CLUSTER_ROUTER_BASE(used for OCP deployments) does not affect the local Kind CI hostname;clusterRouterBaseis fixed toapps.testinginci/values-ci.yamlbecauseci-setup.shwrites127.0.0.1 rhdh-ci.apps.testingto/etc/hostsand configures the Kind ingress to that same hostname — changing the variable alone without re-running the cluster setup would break the routing.