{"id":20410296,"url":"https://github.com/kuadrant/testsuite","last_synced_at":"2025-10-30T09:32:41.227Z","repository":{"id":40944541,"uuid":"495852360","full_name":"Kuadrant/testsuite","owner":"Kuadrant","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-16T12:56:45.000Z","size":911,"stargazers_count":3,"open_issues_count":38,"forks_count":11,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-17T19:16:30.473Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kuadrant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-05-24T14:10:58.000Z","updated_at":"2024-04-23T14:13:49.453Z","dependencies_parsed_at":"2023-11-21T11:50:26.064Z","dependency_job_id":"58f773fd-e2ee-4d6e-b1e7-29f9233d1f8e","html_url":"https://github.com/Kuadrant/testsuite","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kuadrant%2Ftestsuite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kuadrant%2Ftestsuite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kuadrant%2Ftestsuite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kuadrant%2Ftestsuite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kuadrant","download_url":"https://codeload.github.com/Kuadrant/testsuite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248592189,"owners_count":21130203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T05:45:25.547Z","updated_at":"2025-10-30T09:32:41.222Z","avatar_url":"https://github.com/Kuadrant.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kuadrant E2E testsuite\n\nThis repository contains end-to-end tests for Kuadrant project. It supports running tests either against standalone Authorino and Authorino Operator, or the entire Kuadrant, both Service Protection and MGC. For more information about Kuadrant, please visit https://kuadrant.io/\n\n## Requirements\n\n### Authorino standalone tests\n* Kubernetes cluster\n* Authorino Operator installed\n* Use `authorino-standalone` make target\n\n### Service Protection tests\n* Kubernetes cluster\n* Kuadrant Operator installed\n* Use `test` make target\n\n### DNSPolicy tests\n* Existing DNS provider Secret named `aws-credentials` (name defined in `control_plane.provider_secret`) with annotation containing the base domain. Example AWS provider Secret:\n```yaml\nkind: Secret\napiVersion: v1\nmetadata:\n  name: aws-credentials\n  namespace: kuadrant\n  annotations:\n    base_domain: example.com\ndata:\n  AWS_ACCESS_KEY_ID: \u003ckey\u003e\n  AWS_REGION: \u003cregion\u003e\n  AWS_SECRET_ACCESS_KEY: \u003ckey\u003e\ntype: kuadrant.io/aws\n```\n\n### TLSPolicy tests\n* Kuadrant QE self-signed CA ClusterIssuer which can be found here [kuadrant-helm-install](https://github.com/azgabur/kuadrant-helm-install/tree/main/instances/templates/cert-manager)\n* (Optional) Existing lets-encrypt ClusterIssuer or Issuer, named `letsencrypt-staging-issuer` (name defined in `letsencrypt.issuer.name`)\n\n## Configuration\n\nKuadrant testsuite uses [Dynaconf](https://www.dynaconf.com/) for configuration, which means you can specify the configuration through either settings files in `config` directory or through environmental variables. \nAll the required and possible configuration options can be found in `config/settings.local.yaml.tpl`\n\n### Kubernetes auto-fetching\n\nSome configuration options can be fetched from Kubernetes if there are correctly deployed [tools](https://github.com/3scale-qe/tools).\nTools can be deployed by using `overlays/kuadrant` overlay like this:\n```bash\noc apply -k overlays/kuadrant/ --namespace tools\n```\n\n### Settings files\n\nSettings files are located at `config` directory and are in `yaml` format. To use them for local development, you can create `settings.local.yaml` and put all settings there.\n\n### Environmental variables\n\nYou can also configure all the settings through environmental variables as well. We use prefix `KUADRANT` so the variables can look like this:\n```bash\nexport KUADRANT_RHSSO__url=\"https://my-sso.net\"\n```\nYou can find more info on the [Dynaconf wiki page](https://www.dynaconf.com/envvars/)\n\n## Usage\n\nYou can run and manage environment for testsuite with the included Makefile, but the recommended way how to run the testsuite is from Container image\n\n### Local development setup\n\nRequirements:\n* Python 3.11+\n* [poetry](https://python-poetry.org/)\n* [CFSSL](https://github.com/cloudflare/cfssl)\n* [kubectl](https://kubernetes.io/docs/reference/kubectl/) (kubectl)\n\nIf you have all of those, you can run ```make poetry``` to install virtual environment and all dependencies\nTo run all tests you can then use ```make test```\n\n### Running from container\n\nFor just running tests, the container image is the easiest option, you can log in to Kubernetes and then run it like this\n\nIf you omit any options, Testsuite will run only subset of tests that don't require that variable e.g. not providing Auth0 will result in skipping Auth0 tests.\n\nNOTE: For binding kubeconfig file, the \"others\" need to have permission to read, otherwise it will not work.\nThe results and reports will be saved in `/test-run-results` in the container.\n\n#### With tools setup\n\n```bash\npodman run \\\n\t-v $HOME/.kube/config:/run/kubeconfig:z \\\n\t-e KUADRANT_SERVICE_PROTECTION__PROJECT=authorino \\\n\t-e KUADRANT_SERVICE_PROTECTION__PROJECT2=authorino2 \\\n\t-e KUADRANT_AUTH0__url=\"AUTH0_URL\" \\\n\t-e KUADRANT_AUTH0__client_id=\"AUTH0_CLIENT_ID\" \\\n\t-e KUADRANT_AUTH0__client_secret=\"AUTH0_CLIENT_SECRET\" \\\t\n\tquay.io/kuadrant/testsuite:latest\n```\n\n#### Without tools\n\n```bash\npodman run \\\n\t-v $HOME/.kube/config:/run/kubeconfig:z \\\n\t-e KUADRANT_SERVICE_PROTECTION__PROJECT=authorino \\\n\t-e KUADRANT_SERVICE_PROTECTION__PROJECT2=authorino2 \\\n\t-e KUADRANT_KEYCLOAK__url=\"https://my-sso.net\" \\\n\t-e KUADRANT_KEYCLOAK__password=\"ADMIN_PASSWORD\" \\\n\t-e KUADRANT_KEYCLOAK__username=\"ADMIN_USERNAME\" \\\n\t-e KUADRANT_AUTH0__url=\"AUTH0_URL\" \\\n\t-e KUADRANT_AUTH0__client_id=\"AUTH0_CLIENT_ID\" \\\n\t-e KUADRANT_AUTH0__client_secret=\"AUTH0_CLIENT_SECRET\" \\\n\tquay.io/kuadrant/testsuite:latest\n```\n\n## Developing tests\n\nFor developing tests for Authorino you might need to know content of the authorization JSON, you can do that through this AuthConfig, which will return all the context in the response\n\n```yaml\napiVersion: authorino.kuadrant.io/v1beta3\nkind: AuthConfig\nmetadata:\n  name: example\nspec:\n  hosts:\n    - '*'\n  response:\n    success:\n      headers:\n        auth-json:\n          json:\n            properties:\n              auth:\n                selector: auth\n              context:\n                selector: context\n```\n\nAnother thing which might helpful is using playground for developing OPA policies https://play.openpolicyagent.org/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuadrant%2Ftestsuite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkuadrant%2Ftestsuite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuadrant%2Ftestsuite/lists"}