test(mounts): admin CRUD hurl coverage + frontend mounts-tab tests

Close the two coverage gaps in the external-mounts feature — the admin
REST surface and the admin UI tab both previously had no automated tests.

Backend (hurl):
- tests/api/external_mounts.hurl — black-box coverage of the admin mount
  endpoints (list / create / delete): input validation (empty name,
  non-existent host path → 400), create → 201 with the full view, the
  mount appears in the list, delete → 204 then 404, and the /api/admin
  middleware denies a non-admin on every verb → 403.
- server.env: enable OXICLOUD_ENABLE_EXTERNAL_MOUNTS for the test server;
  run.sh: register the new scenario.

Frontend (vitest):
- admin/page.test.ts — opening the mounts tab loads + lists mounts,
  the create form calls createExternalMount, and delete goes through the
  confirm modal to deleteExternalMount.

Tooling:
- devenv.nix: add b3sum (used by tests/api/run.sh's storage-integrity check).
This commit is contained in:
Bradley Nelson
2026-07-21 18:19:03 -06:00
parent 05ae217022
commit 3ad38ddde7
5 changed files with 248 additions and 0 deletions
+1
View File
@@ -36,6 +36,7 @@
# API/WebDAV functional tests + the DB-readiness probe in tests/common/spawn-db.sh
hurl
netcat-gnu # provides `nc`
b3sum # storage-integrity check in tests/api/run.sh
];
# Dev Postgres on :5432, matching DATABASE_URL in example.env