4.0 KiB
4.0 KiB
name, description
| name | description |
|---|---|
| local-e2e-validation | Use when building, changing, or running the reproducible Bifrost local stack validation that provisions Gitea fixtures and imports them through the SonarQube page. |
Local end-to-end validation
- Build the JAR from the repository tag-derived version before starting the stack; mount that exact file read-only into SonarQube.
- Use only Compose project
bifrost-e2efor automated state. Reset its named volumes withdown --volumes --remove-orphans; never delete the user's defaultbifrostproject or other volumes. - Wait for PostgreSQL, Gitea, and SonarQube health checks before provisioning. Require exact SonarQube version
25.9.0.112764and verify plugin runtime before browser actions. - Create a test-only Gitea administrator with the pinned Gitea CLI. Generate a disposable token through the documented Gitea API and keep credentials and tokens in process memory or test-only environment variables.
- Seed two organizations (
alpha-lab,beta-lab) and two repositories in each (api,web) through the Gitea API. Repeated repository names across organizations are expected. - Configure
sonar.bifrost.*with SonarQube Web APIs. In the disposable 25.9 instance, acceptsonar.plugins.risk.consentthrough the public settings API, then create a UI session throughapi/authentication/login. - Dismiss SonarQube first-run welcome and Joyride overlays before checking controls. Wait for repository rows to reflect the selected organization before selecting all.
- Assert organization switching retains selection, all four projects are created with organization-prefixed keys, every project receives a Gitea link, imported rows are disabled, and the page emits no JavaScript errors. The fixture deliberately repeats
apiandwebacross the organizations. - Keep the stack after a successful test for inspection. On failure retain the stack and Playwright trace/screenshots. Cleanup only with the dedicated project command.
- Do not report full validation unless the script exits successfully and the independent API assertions pass.
Checklist
- Exact plugin JAR version and manifest are used by Compose.
- Fresh Gitea and SonarQube state is provisioned with test-only credentials.
- Both organizations and all four repositories are verified in Gitea.
- Chromium exercises the real plugin page and its selection/import controls.
- SonarQube API confirms each project and its Gitea link.
- Imported project state and browser errors are checked.
- Only the
bifrost-e2eproject can be reset by the runner.
Commands
./scripts/e2e.ps1
docker compose --project-name bifrost-e2e ps
docker compose --project-name bifrost-e2e down --volumes --remove-orphans
Sources
- SonarQube page extensions: https://docs.sonarsource.com/sonarqube-community-build/extension-guide/developing-a-plugin/adding-pages-to-the-webapp (consulted 2026-10-29)
- SonarQube project creation API: https://docs.sonarsource.com/sonarqube-community-build/project-administration/creating-project/automating-creation (consulted 2026-10-29)
- SonarQube settings Web API: https://docs.sonarsource.com/sonarqube-community-build/extension-guide/web-api (consulted 2026-10-29)
- Gitea 1.23 token API: https://docs.gitea.com/api/1.23/operations/user-create-token/ (consulted 2026-10-29)
- Gitea 1.23 organization repository API: https://docs.gitea.com/api/1.23/operations/create-org-repo/ (consulted 2026-10-29)
- Gitea command line: https://docs.gitea.com/administration/command-line/ (consulted 2026-10-29)
- Playwright Docker: https://playwright.dev/docs/docker (consulted 2026-10-29)
- Playwright test configuration: https://playwright.dev/docs/test-configuration (consulted 2026-10-29)
- Docker Compose specification: https://docs.docker.com/compose/compose-file/ (consulted 2026-10-29)
Not verified
- The full local flow passed on 2026-10-29 with SonarQube Community Build 25.9.0.112764, Gitea 1.23.8, PostgreSQL 17.2, and Playwright 1.64.1. External Gitea versions and Linux Docker hosts have not been exercised here.