Sanitized single-commit public mirror of recipe-maintainer. - Removed test-ssh/.testenv (live creds); added test-ssh/.testenv.example placeholders. - Removed plans/ and planned-updates/ (deployment-planning docs) so no client/ deployment domains appear in the public repo. - All other secret stores were already gitignored. - docs.coopcloud.tech retained as a submodule (public upstream).
4.4 KiB
La Suite Drive Tests
Requires
- keycloak
Target
- URL: https://lasuite-drive.<DOMAIN_SUFFIX>
- Keycloak: https://keycloak.<DOMAIN_SUFFIX> (realm:
lasuite-drive)
Prerequisites
Keycloak (keycloak.<DOMAIN_SUFFIX>) must be deployed before testing lasuite-drive. The OIDC login test and any manual authentication testing depend on it. If Keycloak is not running, deploy it first with /recipe-deploy keycloak.
Automated Checks
Run the scripts in tests/ to perform automated testing:
-
tests/health_check.py— Confirms the instance is reachable and returns HTTP 200. -
tests/wopi_configured.py— Verifies WOPI discovery endpoints are reachable:- Checks Collabora discovery endpoint returns valid WOPI XML
- Checks OnlyOffice discovery endpoint returns valid WOPI XML
-
tests/wopi_on_startup.py— Confirms WOPI configuration runs automatically on celery worker startup:- Checks celery worker container logs for the entrypoint WOPI trigger message
- Verifies the trigger completed without errors
-
tests/celery_beat_wopi.py— Verifies Celery Beat WOPI scheduling:- Confirms the
celery-beatservice is running - Confirms the old
schedulerservice is removed - Waits up to 90s for the WOPI configuration task to fire and checks logs via SSH
Thorough mode only. This test sleeps ~15-90 seconds waiting for the Celery Beat scheduler to fire. Skip in quick mode. Requires the test instance to have
WOPI_CONFIGURATION_CRONTAB_MINUTE=*andWOPI_CONFIGURATION_CRONTAB_HOUR=*set so the task fires every minute. - Confirms the
-
tests/oidc_login.py— Tests the full OIDC authentication flow end-to-end:- Verifies Drive's
/api/v1.0/authenticate/redirects to Keycloak - Obtains an access token from Keycloak via direct access grant (password flow)
- Calls Drive's
/api/v1.0/users/me/with the token and verifies the correct user is returned
This test reads credentials from
keycloak-test-credentials.<DOMAIN_SUFFIX>.toml. - Verifies Drive's
Keycloak OIDC Integration
La Suite Drive requires an OIDC provider. The test instance uses Keycloak at keycloak.<DOMAIN_SUFFIX>.
Setup
Run setup_keycloak_integration.py to configure everything automatically. The script:
- Creates a
lasuite-driverealm in Keycloak - Creates a
driveOIDC client (confidential, standard flow + direct access grants) - Creates a test user (
testuser/testpass123) - Inserts the OIDC client secret into the Drive app via
abra app secret insert - Updates the Drive env file with
OIDC_REALM,AUTH_DOMAIN,OIDC_RP_CLIENT_ID - Writes all credentials to
keycloak-test-credentials.<DOMAIN_SUFFIX>.toml
After running the setup script, redeploy Drive:
abra app deploy lasuite-drive.<DOMAIN_SUFFIX> --chaos --force --no-input
The script is idempotent — it skips resources that already exist and resets the test user password.
Credentials
All Keycloak credentials are stored in keycloak-test-credentials.<DOMAIN_SUFFIX>.toml (sourceable):
| Variable | Description |
|---|---|
KC_ADMIN_USER / KC_ADMIN_PASS |
Keycloak admin (master realm) |
KC_REALM |
Keycloak realm name (lasuite-drive) |
KC_CLIENT_ID / KC_CLIENT_SECRET |
OIDC client ID and secret |
KC_TEST_USER / KC_TEST_PASS |
Test user credentials |
KC_TEST_EMAIL |
Test user email |
Key Endpoints
| Endpoint | Purpose |
|---|---|
https://lasuite-drive.<DOMAIN_SUFFIX>/api/v1.0/authenticate/ |
Initiates OIDC login (302 redirect to Keycloak) |
https://lasuite-drive.<DOMAIN_SUFFIX>/api/v1.0/callback/ |
OIDC callback (Keycloak redirects here after login) |
https://keycloak.<DOMAIN_SUFFIX>/realms/lasuite-drive/protocol/openid-connect/token |
Keycloak token endpoint |
Post-Deploy Steps
After deploying Drive for the first time, run:
- Migrations:
script -qefc 'abra app cmd lasuite-drive.<DOMAIN_SUFFIX> backend migrate --no-input' /dev/null - Minio buckets:
abra app restart lasuite-drive.<DOMAIN_SUFFIX> minio-createbuckets --no-input(will appear to hang — this is expected) - Keycloak integration:
python3 setup_keycloak_integration.pythen redeploy
Manual Verification
- Open https://lasuite-drive.<DOMAIN_SUFFIX> in a browser.
- Confirm the La Suite Drive landing page loads without errors.
- Click "Login" and verify the OIDC redirect to Keycloak works.
- Log in with test credentials (
testuser/testpass123). - After logging in, verify you can create and open a document.