595273277b
add a full coverage of Webdav and Nextcloud
purpose: prepare move to Drives and ensure no regression at all
test scenarios are in docs/plan/BASELINE_TESTS_NC_WEBDAV.md
current existing bugs identified via these tests:
┌──────────┬─────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Bug │ Surface │ Pin location │
├──────────┼─────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ G4/G5/K5 │ NC │ AlreadyExists → 500 instead of 412 (handle_move + trashbin restore) │
├──────────┼─────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ G9 │ NC │ Folder DELETE not row-recursive — orphan descendants stay live │
├──────────┼─────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ M5/M7 │ Native │ resolve_path_for_user mismatch — PUT writes, GET reads via lenient lookup, MOVE/DELETE can't find │
│ │ │ via strict │
├──────────┼─────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ M8 │ Native │ COPY discards destination filename — collides with source │
├──────────┼─────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ N2 │ Native │ LOCK creates the token, mutators don't check it — class-2 advertisement is aspirational │
└──────────┴─────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘
72 lines
3.5 KiB
Plaintext
72 lines
3.5 KiB
Plaintext
# =============================================================
|
|
# OxiCloud — Baseline: NC status + capabilities
|
|
# =============================================================
|
|
# Group A from BASELINE_TESTS_NC_WEBDAV.md (4 scenarios).
|
|
#
|
|
# These four endpoints are what every NC client probes first.
|
|
# If any of them returns the wrong shape, NC desktop refuses to
|
|
# even attempt sync, so the regression signal is loud and early.
|
|
#
|
|
# Anonymous (no auth) — these endpoints must be public.
|
|
# =============================================================
|
|
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# A1 — GET /status.php
|
|
# Used by NC client for "is this server installed?".
|
|
# ─────────────────────────────────────────────────────────────
|
|
GET {{base_url}}/status.php
|
|
|
|
HTTP 200
|
|
[Asserts]
|
|
jsonpath "$.installed" == true
|
|
jsonpath "$.maintenance" == false
|
|
jsonpath "$.version" exists
|
|
jsonpath "$.versionstring" exists
|
|
jsonpath "$.productname" == "OxiCloud"
|
|
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# A2 — GET /index.php/204
|
|
# NC mobile connectivity probe. Must be 204, empty body.
|
|
# ─────────────────────────────────────────────────────────────
|
|
GET {{base_url}}/index.php/204
|
|
|
|
HTTP 204
|
|
[Asserts]
|
|
bytes count == 0
|
|
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# A3 — GET /ocs/v1.php/cloud/capabilities
|
|
# OCS v1 envelope must report statuscode 100.
|
|
# ─────────────────────────────────────────────────────────────
|
|
GET {{base_url}}/ocs/v1.php/cloud/capabilities?format=json
|
|
|
|
HTTP 200
|
|
[Asserts]
|
|
jsonpath "$.ocs.meta.status" == "ok"
|
|
jsonpath "$.ocs.meta.statuscode" == 100
|
|
jsonpath "$.ocs.meta.message" == "OK"
|
|
jsonpath "$.ocs.data.version.major" exists
|
|
jsonpath "$.ocs.data.capabilities" exists
|
|
jsonpath "$.ocs.data.capabilities.theming.name" == "OxiCloud"
|
|
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# A4 — GET /ocs/v2.php/cloud/capabilities
|
|
# OCS v2 envelope must report statuscode 200 (200 ≡ 100
|
|
# semantically — different status enum across versions).
|
|
# Payload shape otherwise identical to v1.
|
|
# ─────────────────────────────────────────────────────────────
|
|
GET {{base_url}}/ocs/v2.php/cloud/capabilities?format=json
|
|
|
|
HTTP 200
|
|
[Asserts]
|
|
jsonpath "$.ocs.meta.status" == "ok"
|
|
jsonpath "$.ocs.meta.statuscode" == 200
|
|
jsonpath "$.ocs.meta.message" == "OK"
|
|
jsonpath "$.ocs.data.version.major" exists
|
|
jsonpath "$.ocs.data.capabilities" exists
|
|
jsonpath "$.ocs.data.capabilities.theming.name" == "OxiCloud"
|