test: normalize mounted notification token
CI / test (pull_request) Successful in 10s
CI / test (push) Successful in 11s

This commit was merged in pull request #13.
This commit is contained in:
m
2026-08-16 19:33:48 +03:00
parent 01e1bdea1e
commit 759328972a
+1 -1
View File
@@ -120,7 +120,7 @@ $notificationAction = Creator-Post http://localhost:8082/v1/creator/continuity/n
if ($notificationAction.State -ne 'SUCCEEDED' -or -not $notificationAction.ActionIntentID) { throw 'Creator notification did not produce a successful receipt' }
$notificationItem = docker --context $DockerContext exec $continuityContainer wget -qO- "http://localhost:8081/v1/prospective-items/$notificationProspective" | ConvertFrom-Json
if ($notificationItem.State -ne 'DELIVERED' -or $notificationItem.Revision -ne 1) { throw 'Notification changed Continuity canonical state' }
$receiptRaw = docker --context $DockerContext exec $receiverContainer sh -c 'token=$(cat /run/notification-reader/token); wget -qO- --header="Authorization: Bearer $token" "$1"' sh "http://localhost:8085/delivery/v1/receipts/$($notificationAction.ActionIntentID)"
$receiptRaw = docker --context $DockerContext exec $receiverContainer sh -c 'token=$(tr -d "\r\n" < /run/notification-reader/token); wget -qO- --header="Authorization: Bearer $token" "$1"' sh "http://localhost:8085/delivery/v1/receipts/$($notificationAction.ActionIntentID)"
if ($LASTEXITCODE -ne 0) { throw 'Notification receipt lookup failed' }
$receipt = ($receiptRaw -join "`n") | ConvertFrom-Json
if ($receipt.action_intent_id -ne $notificationAction.ActionIntentID -or $receipt.request_digest -notmatch '^[0-9a-f]{64}$') { throw 'Notification receipt evidence mismatch' }