en un clic
run-tests
// Run tests for the edp-keycloak-operator. By default runs unit + integration tests. Use /run-tests e2e for end-to-end tests.
// Run tests for the edp-keycloak-operator. By default runs unit + integration tests. Use /run-tests e2e for end-to-end tests.
Use when adding a new field to an existing Custom Resource. Guides the full workflow: API types, code generation, CRD examples, client investigation, handler mapping, and tests.
Use when generating testify mocks for an interface. Ensures the interface is registered in .mockery.yml, runs make mocks, and verifies the output file.
Run golangci-lint linters and fix any linting errors. Use when fixing lint issues or before committing code.
| name | run-tests |
| description | Run tests for the edp-keycloak-operator. By default runs unit + integration tests. Use /run-tests e2e for end-to-end tests. |
| argument-hint | [unit|integration|e2e] |
| allowed-tools | Bash(make *), Bash(docker *), Read |
| context | fork |
Dispatch based on $ARGUMENTS:
unit: run unit tests onlyintegration: run unit + integration testse2e: run e2e tests onlymake test
No external dependencies. TEST_KEYCLOAK_URL must NOT be set — integration tests will be skipped automatically.
Requires a running Keycloak instance on port 8086.
docker ps --filter name=keycloak-test --format '{{.Names}}'
make start-keycloak
TEST_KEYCLOAK_URL=http://localhost:8086 make test
Long-running. Requires kind cluster, kuttl, and Docker.
Prerequisites — verify before running:
make start-kind if not)make install if not)make e2e
coverage.outPASS with coverage summary = all tests passedFAIL lines indicate failures — read the error output carefullygo test -v ./pkg/client/keycloakapi/...