fix(e2e): redeem pairing codes at the public endpoint
Both harnesses posted the redeem body to `/api/v1/pair`, which mints a code and
requires a device/CLI token, so `e2e_pair` got a 401 and every run died at
"FATAL: pair redeem failed" before the first scenario. Redeeming is the public
half of pairing (ADR 0001): the code is the capability, and the endpoint is
`POST /api/v1/pair/redeem`, unauthenticated and rate limited.
- `scripts/e2e/lib.sh` and `scripts/e2e/visual.sh` post the `{code, deviceName,
kind}` body to `/api/v1/pair/redeem`
- the suite reaches A0 again: `run-api.sh` runs A0–A14, `run-ui.sh` B1–B15
This commit is contained in:
1 parent
3a797ac3f7
commit
c24f30fe71
2 files changed
+4
-2
No files matched your search
@@ -46,7 +46,7 @@ done
|
||||
echo "instance: $ST workspace: $WSID"
|
||||
|
||||
CODE=$(cmd '{"method":"pair.create","params":{}}' | jq -r '.code')
|
||||
DEVTOKEN=$(curl -fsS -X POST "$BASE/api/v1/pair" -H 'Content-Type: application/json' \
|
||||
DEVTOKEN=$(curl -fsS -X POST "$BASE/api/v1/pair/redeem" -H 'Content-Type: application/json' \
|
||||
-d "{\"code\":\"$CODE\",\"deviceName\":\"Playwright\",\"kind\":\"laptop\"}" | jq -r '.token')
|
||||
echo "paired device token: ${DEVTOKEN:0:8}…"
|
||||
|
||||
|
||||
Reference in new issue
Block a user