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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user