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
@@ -188,6 +188,7 @@ hurl --variables-file "$API_DIR/test.env" --file-root "$REPO_ROOT/tests" --test
"$API_DIR/nc_second_user_setup.hurl" \
"$API_DIR/nc_admin_views_other_user.hurl" \
"$API_DIR/admin_user_ops.hurl" \
"$API_DIR/external_mounts.hurl" \
"$API_DIR/chunked_upload_cap.hurl" \
"$API_DIR/nc_auth_failures.hurl" \
"$API_DIR/dedup_create.hurl" \