| 1 | # End-to-end test script for the web push path (see web-push-e2e.nix). |
| 2 | # Each background server is launched with start, which waits up to 30 |
| 3 | # seconds for its listening address, and the EXIT trap stops all running |
| 4 | # servers when the script exits. |
| 5 | set -euo pipefail |
| 6 | |
| 7 | export HOME="$TMPDIR/home" |
| 8 | export XDG_CACHE_HOME="$TMPDIR/cache" |
| 9 | export XDG_STATE_HOME="$TMPDIR/xdg-state" |
| 10 | export GIT_CONFIG_NOSYSTEM=1 |
| 11 | export GIT_CONFIG_GLOBAL="$TMPDIR/gitconfig" |
| 12 | printf '[user]\n\tname = operator\n\temail = operator@example.org\n[init]\n\tdefaultBranch = main\n' > "$GIT_CONFIG_GLOBAL" |
| 13 | cd "$TMPDIR" |
| 14 | |
| 15 | fail() { |
| 16 | echo "web-push-e2e: $*" >&2 |
| 17 | exit 1 |
| 18 | } |
| 19 | |
| 20 | # The servers still running, stopped on every exit. |
| 21 | pids=() |
| 22 | stop() { |
| 23 | local pid=$1 rest=() p |
| 24 | kill -TERM "$pid" 2> /dev/null || true |
| 25 | for _ in $(seq 150); do |
| 26 | kill -0 "$pid" 2> /dev/null || break |
| 27 | sleep 0.1 |
| 28 | done |
| 29 | kill -KILL "$pid" 2> /dev/null || true |
| 30 | wait "$pid" 2> /dev/null || true |
| 31 | for p in "${pids[@]}"; do |
| 32 | if [ "$p" != "$pid" ]; then rest+=("$p"); fi |
| 33 | done |
| 34 | pids=("${rest[@]}") |
| 35 | } |
| 36 | cleanup() { |
| 37 | for pid in "${pids[@]}"; do stop "$pid"; done |
| 38 | } |
| 39 | trap cleanup EXIT |
| 40 | |
| 41 | # start NAME LOG COMMAND...: start a server that prints "NAME: listening |
| 42 | # on ADDR" on stderr once it listens, and wait at most 30 seconds for it. |
| 43 | # It sets pid and addr. |
| 44 | start() { |
| 45 | local name=$1 log=$2 |
| 46 | shift 2 |
| 47 | "$@" 2> "$log" & |
| 48 | pid=$! |
| 49 | pids+=("$pid") |
| 50 | for _ in $(seq 300); do |
| 51 | addr=$(sed -n "s/^$name: listening on //p" "$log") |
| 52 | if [ -n "$addr" ]; then return; fi |
| 53 | kill -0 "$pid" 2> /dev/null || fail "$name exited before it listened: $(cat "$log")" |
| 54 | sleep 0.1 |
| 55 | done |
| 56 | fail "$name did not say where it listens within 30 seconds" |
| 57 | } |
| 58 | |
| 59 | # get PATH: valley-web's status and Location for a GET of PATH, with its |
| 60 | # body in $TMPDIR/body. follow PATH: the same after following redirects. |
| 61 | get() { |
| 62 | curl -sS --max-time 10 -o "$TMPDIR/body" -w '%{http_code} %header{location}' "http://$web$1" |
| 63 | } |
| 64 | follow() { |
| 65 | curl -sS --max-time 10 --max-redirs 3 -L -o "$TMPDIR/body" -w '%{http_code}' "http://$web$1" |
| 66 | } |
| 67 | # serves PATH TEXT: valley-web serves PATH, after its redirect to the |
| 68 | # tree, with TEXT in the page. gone PATH: it answers 404. |
| 69 | serves() { |
| 70 | local status |
| 71 | status=$(follow "$1") |
| 72 | [ "$status" = 200 ] || fail "valley-web answered $1 with $status, want 200" |
| 73 | grep -qF "$2" "$TMPDIR/body" || fail "valley-web's page for $1 does not show $2" |
| 74 | } |
| 75 | gone() { |
| 76 | local status |
| 77 | status=$(get "$1") |
| 78 | [ "$status" = "404 " ] || fail "valley-web answered $1 with $status, want 404" |
| 79 | } |
| 80 | |
| 81 | # One pass of the publisher as the package wraps it, with its pinned git, |
| 82 | # cue, valley CLI and schemas. |
| 83 | publish() { |
| 84 | timeout -k 10 "${within:-300}" valley-web-publish --instance-repo "$TMPDIR/srv/valley.git" \ |
| 85 | --instance valley-host --destination example.org --host "$TMPDIR/host.json" \ |
| 86 | --state "$TMPDIR/publisher" --principals "$TMPDIR/principals.json" "$@" |
| 87 | } |
| 88 | |
| 89 | commit() { |
| 90 | git -C "work/$1" add --all |
| 91 | git -C "work/$1" commit --quiet -m "$1: $2" |
| 92 | git -C "work/$1" push --quiet origin main |
| 93 | } |
| 94 | |
| 95 | # The projects' publication identities, which their policy/read declares |
| 96 | # and the registry's grants name. |
| 97 | declare -A id=( |
| 98 | [valley]=f83927d5a4ed068cdd02a8cdaa09f26d |
| 99 | [app]=9da6809f038df92138c131cd16bed76d |
| 100 | [site]=273d5668702918ea7ae079de374db96b |
| 101 | ) |
| 102 | read_policy() { |
| 103 | printf 'package read\n\nproject: "%s"\nidentity: "%s"\nreaders: {%s}\n' "$1" "${id[$1]}" "$2" |
| 104 | } |
| 105 | # The instance's registry: the operator governs it, and anyone may read |
| 106 | # the projects of the scope given at the edge. |
| 107 | registry() { |
| 108 | cat << EOF |
| 109 | package identity |
| 110 | |
| 111 | boundaries: { |
| 112 | registry: kind: "registry" |
| 113 | web: {kind: "edge-read", destination: "example.org"} |
| 114 | } |
| 115 | genesis: "operator" |
| 116 | principals: operator: { |
| 117 | kind: "human" |
| 118 | keys: [{class: "ssh-ed25519", bound: "hardware", public: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKeyForARejectedFixtureAAAAAAAAAAA"}] |
| 119 | grants: { |
| 120 | govern: boundary: "registry" |
| 121 | read: {boundary: "web", projects: "all"} |
| 122 | } |
| 123 | } |
| 124 | anyone: grants: read: {boundary: "web", projects: $1} |
| 125 | EOF |
| 126 | } |
| 127 | |
| 128 | # 1. The instance and its two projects, each with its own README, and both |
| 129 | # readable by anyone, in the group tools. app has the short alias a, and |
| 130 | # site the former name homepage. |
| 131 | for name in valley app site; do |
| 132 | git init --quiet --bare "srv/$name.git" |
| 133 | git init --quiet "work/$name" |
| 134 | git -C "work/$name" remote add origin "$TMPDIR/srv/$name.git" |
| 135 | git -C "work/$name" config valley.principal operator |
| 136 | done |
| 137 | mkdir -p work/valley/policy/instance work/valley/policy/read work/valley/identity |
| 138 | echo 'package verification' > work/valley/policy/instance/floor.cue |
| 139 | read_policy valley 'operator: true' > work/valley/policy/read/read.cue |
| 140 | registry "{app: \"${id[app]}\", site: \"${id[site]}\"}" > work/valley/identity/registry.cue |
| 141 | commit valley "the instance" |
| 142 | projects=$(printf 'app\nsite\nvalley\n' | git -C srv/valley.git hash-object -w --stdin) |
| 143 | git -C srv/valley.git update-ref refs/the-valley/projects "$projects" |
| 144 | for name in app site; do |
| 145 | mkdir -p "work/$name/policy/read" |
| 146 | echo "$TMPDIR/srv/valley.git" > "work/$name/policy/valley" |
| 147 | printf '# %s\n\n%s-readme-text\n' "$name" "$name" > "work/$name/README.md" |
| 148 | read_policy "$name" 'anyone: true, operator: true' > "work/$name/policy/read/read.cue" |
| 149 | commit "$name" "the first commit" |
| 150 | done |
| 151 | knot=$(cd work/app && valley knot new outcome "Open the edge" --json | jq -r .knot.id) |
| 152 | |
| 153 | cat > host.cue << 'EOF' |
| 154 | package valley |
| 155 | |
| 156 | groups: core: name: "tools" |
| 157 | projects: app: {group: "core", aliases: ["a"]} |
| 158 | projects: site: {group: "core", formerNames: ["homepage"]} |
| 159 | projects: valley: {} |
| 160 | EOF |
| 161 | cue export --out json "$schema" host.cue > host.json |
| 162 | echo '{"operator": "operator"}' > principals.json |
| 163 | |
| 164 | # 2. A pass to a directory makes the export key, whose verifier line the |
| 165 | # receiver pins from its first start. Then the receiver and valley-web |
| 166 | # start over one state directory, and a pass uploads. |
| 167 | publish --out first > /dev/null |
| 168 | test -s publisher/verifier || fail "the first pass made no verifier line" |
| 169 | echo edge-token-0123456789abcdef0123456789 > token |
| 170 | echo another-token-0123456789abcdef0123456 > wrong |
| 171 | receive() { |
| 172 | start valley-web-receive receive.log valley-web-receive --state edge/store --listen 127.0.0.1:0 \ |
| 173 | --instance valley-host --destination example.org --verifiers publisher/verifier --token-file token |
| 174 | receiver_pid=$pid receiver=http://$addr |
| 175 | } |
| 176 | serve() { |
| 177 | start valley-web web.log valley-web --state edge/store --listen 127.0.0.1:0 |
| 178 | web_pid=$pid web=$addr |
| 179 | } |
| 180 | receive |
| 181 | publish --receiver "$receiver" --receiver-token token > pass.out |
| 182 | grep -q "the receiver stored authorization 2: anyone may read app, site" pass.out || |
| 183 | fail "the pass did not say the receiver stored its authorization: $(cat pass.out)" |
| 184 | grep -q "the receiver activated sequence" pass.out || fail "the pass did not say the receiver activated it: $(cat pass.out)" |
| 185 | test -f edge/store && test -d edge/v2/generations && test -f edge/v2/authorization || |
| 186 | fail "the receiver did not make the store's descriptor, generations and authorization" |
| 187 | serve |
| 188 | serves /tools/app app-readme-text |
| 189 | serves /tools/site site-readme-text |
| 190 | serves "/tools/app/knots/$knot" "Open the edge" |
| 191 | [ "$(get "/a/knots/$knot?x=1")" = "308 /tools/app/knots/$knot?x=1" ] || |
| 192 | fail "the alias a answered $(get "/a/knots/$knot?x=1")" |
| 193 | [ "$(get /tools/homepage/source/)" = "308 /tools/site/source/" ] || |
| 194 | fail "the former name homepage answered $(get /tools/homepage/source/)" |
| 195 | |
| 196 | # A reader downloads app's source from the link on its tree page: a |
| 197 | # gzipped tar archive of main's tip that lists main's files and |
| 198 | # directories, each under one directory named for the project and the |
| 199 | # commit. |
| 200 | serves /tools/app app-readme-text |
| 201 | tip=$(git -C work/app rev-parse HEAD) |
| 202 | grep -qF "href=\"/tools/app/source/archive/$tip.tar.gz\">Download .tar.gz<" "$TMPDIR/body" || |
| 203 | fail "app's tree page does not link the archive of main's tip" |
| 204 | status=$(curl -sS --max-time 10 -o app.tar.gz -w '%{http_code} %header{content-type}' "http://$web/tools/app/source/archive/$tip.tar.gz") |
| 205 | [ "$status" = "200 application/gzip" ] || fail "valley-web answered app's archive with $status" |
| 206 | prefix=app-${tip:0:12}/ |
| 207 | tar -tzf app.tar.gz | LC_ALL=C sort > listed |
| 208 | { |
| 209 | echo "$prefix" |
| 210 | git -C work/app ls-tree -r -t --format='%(objecttype) %(path)' HEAD | |
| 211 | sed -e "s|^tree \(.*\)|$prefix\1/|" -e "s|^blob \(.*\)|$prefix\1|" |
| 212 | } | LC_ALL=C sort > want |
| 213 | cmp -s listed want || fail "app's archive lists $(cat listed), not $(cat want)" |
| 214 | |
| 215 | # main.tar.gz is one address for the archive of main's tip, wherever main |
| 216 | # is: a temporary redirect to that archive, which curl -L follows to the |
| 217 | # same bytes. |
| 218 | [ "$(get /tools/app/source/archive/main.tar.gz)" = "302 /tools/app/source/archive/$tip.tar.gz" ] || |
| 219 | fail "app's main.tar.gz answered $(get /tools/app/source/archive/main.tar.gz)" |
| 220 | status=$(curl -sS --max-time 10 --max-redirs 3 -L -o main.tar.gz -w '%{http_code} %header{content-type}' "http://$web/tools/app/source/archive/main.tar.gz") |
| 221 | [ "$status" = "200 application/gzip" ] || fail "valley-web answered app's main.tar.gz with $status" |
| 222 | cmp -s main.tar.gz app.tar.gz || fail "app's main.tar.gz is not the archive of main's tip" |
| 223 | |
| 224 | # The pages say when the policy was last checked, apart from when the |
| 225 | # plan was collected. A pass that finds nothing changed sends no content, |
| 226 | # and still sends an authorization, signed again with a later sequence and |
| 227 | # a later check, so the time the pages show advances while export.json |
| 228 | # keeps its bytes. |
| 229 | checked_of() { sed -n 's/^checked //p' "$1"; } |
| 230 | sequence_of() { sed -n 's/^sequence //p' "$1"; } |
| 231 | shown() { date -u -d "$1" '+%Y-%m-%d %H:%M UTC'; } |
| 232 | serves / "Policy last checked $(shown "$(checked_of edge/v2/authorization)")" |
| 233 | grep -qF "Collected " "$TMPDIR/body" || fail "the plan page does not say when the plan was collected" |
| 234 | digest=$(sha256sum edge/v2/current/export.json | cut -d' ' -f1) |
| 235 | before=$(checked_of edge/v2/authorization) |
| 236 | sleep 1.1 |
| 237 | publish --receiver "$receiver" --receiver-token token > pass.out |
| 238 | grep -q "nothing has changed since; nothing is sent" pass.out || fail "an unchanged pass sent content: $(cat pass.out)" |
| 239 | [ "$(sequence_of edge/v2/authorization)" = 3 ] || fail "an unchanged pass stored authorization $(sequence_of edge/v2/authorization), want 3" |
| 240 | [ "$(checked_of edge/v2/authorization)" != "$before" ] || fail "an unchanged pass did not advance the policy check from $before" |
| 241 | [ "$(sha256sum edge/v2/current/export.json | cut -d' ' -f1)" = "$digest" ] || |
| 242 | fail "an unchanged pass changed export.json" |
| 243 | serves / "Policy last checked $(shown "$(checked_of edge/v2/authorization)")" |
| 244 | |
| 245 | # An authorization the receiver stored already is refused as replayed, |
| 246 | # and one whose text was changed is refused for its signature, whatever |
| 247 | # its sequence. |
| 248 | post() { |
| 249 | curl -sS --max-time 10 -o "$TMPDIR/reply" -w '%{http_code}' -H "Authorization: Bearer $(cat token)" \ |
| 250 | --data-binary "@$2" "$receiver$1" |
| 251 | } |
| 252 | [ "$(post /web-export/v2/authorization publisher/authorization)" = 409 ] && grep -q '"error":"replayed"' reply || |
| 253 | fail "a replayed authorization was not refused as replayed: $(cat reply)" |
| 254 | sed 's/^sequence .*/sequence 99/' publisher/authorization > forged |
| 255 | [ "$(post /web-export/v2/authorization forged)" = 403 ] && grep -q '"error":"bad-signature"' reply || |
| 256 | fail "an authorization whose text was changed was not refused for its signature: $(cat reply)" |
| 257 | |
| 258 | # A publisher of the first protocol is refused with a clear error, and |
| 259 | # valley-web refuses the directory the first store layout took as its |
| 260 | # state. |
| 261 | [ "$(post /web-export/v1/manifest forged)" = 410 ] && grep -q '"error":"unsupported-version"' reply || |
| 262 | fail "a manifest of the first protocol was not refused as unsupported-version: $(cat reply)" |
| 263 | if valley-web --state edge --listen 127.0.0.1:0 2> old.log; then fail "valley-web served the store's directory"; fi |
| 264 | grep -q "is a directory" old.log || fail "valley-web refused the store's directory for another reason: $(cat old.log)" |
| 265 | |
| 266 | # 3. A comment changes the export, so the next pass uploads. With another |
| 267 | # token it is refused as unauthenticated, and the edge keeps serving what |
| 268 | # it had. |
| 269 | (cd work/app && valley knot comment "$knot" -m "edge-comment-text" > /dev/null) |
| 270 | if publish --receiver "$receiver" --receiver-token wrong > pass.out 2> pass.err; then |
| 271 | fail "a pass with another token succeeded" |
| 272 | fi |
| 273 | grep -q unauthenticated pass.err || fail "a pass with another token failed for another reason: $(cat pass.err)" |
| 274 | serves "/tools/app/knots/$knot" "Open the edge" |
| 275 | if grep -qF edge-comment-text "$TMPDIR/body"; then fail "the refused pass's comment is served"; fi |
| 276 | |
| 277 | # 4. Withdrawing anyone's grant for app takes app off the edge on the |
| 278 | # next pass, its alias with it, and site stays. |
| 279 | registry "{site: \"${id[site]}\"}" > work/valley/identity/registry.cue |
| 280 | commit valley "withdraw app" |
| 281 | publish --receiver "$receiver" --receiver-token token > /dev/null |
| 282 | gone /tools/app |
| 283 | gone /a |
| 284 | serves /tools/site site-readme-text |
| 285 | |
| 286 | # 4b. A withdrawal by authorization alone, while content work is |
| 287 | # stalled. With app granted again, a new knot changes the export, and a |
| 288 | # pass reads it, site included, then stalls at its upload: the test holds |
| 289 | # the receiver's activation lock, as a commit that checks a large |
| 290 | # repository would. Meanwhile site's grant is withdrawn, and a |
| 291 | # --policy-only pass takes site off the edge at once: valley-web, not |
| 292 | # restarted, answers the next request without it. Once the lock is |
| 293 | # released, the stalled upload, whose content holds site and whose |
| 294 | # sequence is later, activates and restores nothing. The receiver deletes |
| 295 | # site's repository, and the active export.json keeps its signed bytes. |
| 296 | registry "{app: \"${id[app]}\", site: \"${id[site]}\"}" > work/valley/identity/registry.cue |
| 297 | commit valley "grant app again" |
| 298 | publish --receiver "$receiver" --receiver-token token > /dev/null |
| 299 | serves /tools/app app-readme-text |
| 300 | (cd work/site && valley knot new outcome "Withdrawn while stalled" > /dev/null) |
| 301 | flock -o edge/v2/lock sleep 300 & |
| 302 | holder=$! |
| 303 | pids+=("$holder") |
| 304 | publish --receiver "$receiver" --receiver-token token > stalled.out 2> stalled.err & |
| 305 | stalled=$! |
| 306 | for _ in $(seq 600); do |
| 307 | grep -q "^valley-web-publish: public: app, site" stalled.out && break |
| 308 | kill -0 "$stalled" 2> /dev/null || fail "the stalled pass ended before its upload: $(cat stalled.out stalled.err)" |
| 309 | sleep 0.1 |
| 310 | done |
| 311 | grep -q "^valley-web-publish: public: app, site" stalled.out || fail "the stalled pass did not read the valley within a minute" |
| 312 | sleep 1 |
| 313 | registry "{app: \"${id[app]}\"}" > work/valley/identity/registry.cue |
| 314 | commit valley "withdraw site" |
| 315 | within=40 publish --receiver "$receiver" --receiver-token token --policy-only > policy.out || |
| 316 | fail "a --policy-only pass failed while content was stalled" |
| 317 | grep -q "anyone may read app$" policy.out || fail "the --policy-only pass did not withdraw site: $(cat policy.out)" |
| 318 | if grep -q "the receiver activated" policy.out; then fail "the --policy-only pass sent content"; fi |
| 319 | gone /tools/site |
| 320 | gone /tools/homepage |
| 321 | serves /tools/app app-readme-text |
| 322 | kill -0 "$stalled" 2> /dev/null || fail "the stalled pass did not stall: $(cat stalled.out stalled.err)" |
| 323 | stop "$holder" |
| 324 | wait "$stalled" || fail "the stalled pass failed once its upload went on: $(cat stalled.err)" |
| 325 | grep -q "the receiver activated sequence" stalled.out || fail "the stalled pass did not activate its upload: $(cat stalled.out)" |
| 326 | grep -q '"project":"site"' edge/v2/current/export.json || fail "the stalled upload's export does not hold site" |
| 327 | gone /tools/site |
| 328 | digest=$(sha256sum edge/v2/current/export.json | cut -d' ' -f1) |
| 329 | for _ in $(seq 300); do |
| 330 | [ -e edge/v2/current/repos/site.git ] || break |
| 331 | sleep 0.1 |
| 332 | done |
| 333 | [ ! -e edge/v2/current/repos/site.git ] || fail "the receiver kept the repository of site after its withdrawal" |
| 334 | [ -e edge/v2/current/repos/app.git ] || fail "the receiver deleted the repository of app" |
| 335 | [ "$(sha256sum edge/v2/current/export.json | cut -d' ' -f1)" = "$digest" ] || |
| 336 | fail "the withdrawal changed the signed export.json" |
| 337 | |
| 338 | # A store whose authorization is removed serves no project, though |
| 339 | # valley-web has the export indexed already; once it is back, it serves. |
| 340 | mv edge/v2/authorization authorization.kept |
| 341 | [ "$(get /tools/app)" = "503 " ] || fail "with no authorization valley-web answered /tools/app with $(get /tools/app)" |
| 342 | grep -qF "Nothing published yet" "$TMPDIR/body" || fail "with no authorization the page does not say nothing is published" |
| 343 | if grep -qF app-readme-text "$TMPDIR/body"; then fail "with no authorization valley-web served app's README"; fi |
| 344 | [ "$(get /)" = "503 " ] || fail "with no authorization valley-web answered / with $(get /)" |
| 345 | mv authorization.kept edge/v2/authorization |
| 346 | serves /tools/app app-readme-text |
| 347 | |
| 348 | # Granting site again, and withdrawing app as step 4 left it, serves site |
| 349 | # once more: the receiver's reply says it no longer holds site's |
| 350 | # repository, so the pass sends site's bundle again. |
| 351 | registry "{site: \"${id[site]}\"}" > work/valley/identity/registry.cue |
| 352 | commit valley "withdraw app again" |
| 353 | publish --receiver "$receiver" --receiver-token token > pass.out |
| 354 | grep -q "^valley-web-publish: sent .*site; the receiver activated" pass.out || fail "the pass did not send site's bundle again: $(cat pass.out)" |
| 355 | serves /tools/site site-readme-text |
| 356 | gone /tools/app |
| 357 | |
| 358 | # 5. Both servers restart onto the same content. |
| 359 | stop "$receiver_pid" |
| 360 | stop "$web_pid" |
| 361 | receive |
| 362 | serve |
| 363 | gone /tools/app |
| 364 | serves /tools/site site-readme-text |
| 365 | |
| 366 | # 6. With the receiver stopped, valley-web keeps serving. A pass that |
| 367 | # withdraws site fails because it cannot send its authorization, not |
| 368 | # because it failed earlier or hung until timeout ended it, and changes |
| 369 | # nothing served. Once the receiver is back, the next pass checks the |
| 370 | # policy again, signs a new authorization with a later sequence, and takes |
| 371 | # site off the edge. |
| 372 | stop "$receiver_pid" |
| 373 | serves /tools/site site-readme-text |
| 374 | read_policy site 'operator: true' > work/site/policy/read/read.cue |
| 375 | commit site "withdraw it" |
| 376 | status=0 |
| 377 | publish --receiver "$receiver" --receiver-token token > pass.out 2> pass.err || status=$? |
| 378 | case $status in |
| 379 | 0) fail "a pass to a stopped receiver succeeded" ;; |
| 380 | 124 | 137) fail "a pass to a stopped receiver hung until timeout ended it (status $status)" ;; |
| 381 | esac |
| 382 | grep -q "sending authorization [0-9]* failed [0-9]* times: .*dial tcp ${receiver#http://}: connect: connection refused" pass.err || |
| 383 | fail "a pass to a stopped receiver failed with status $status, but not because it could not connect: $(cat pass.err)" |
| 384 | serves /tools/site site-readme-text |
| 385 | unsent=$(sequence_of publisher/authorization) |
| 386 | receive |
| 387 | publish --receiver "$receiver" --receiver-token token > /dev/null |
| 388 | [ "$(sequence_of edge/v2/authorization)" -gt "$unsent" ] || |
| 389 | fail "the pass after the receiver came back stored authorization $(sequence_of edge/v2/authorization), not one signed after $unsent" |
| 390 | gone /tools/site |
| 391 | gone /tools/homepage |
| 392 | gone /tools/app |
| 393 | |
| 394 | touch "$out" |