Watch
0
0
Fork
You've already forked hyperhive
0

store_list: pin the mount-refusal and unreachable-store answers too

The script test's stub gains the two remaining rows of bao's table: a
token with no access to the mount (403 on the preflight) and a store that
is not there. Both end with status 2 and an error on stderr, and both must
be errors, not an empty list.
This commit is contained in:
maia 2026-11-24 18:21:43 +01:00
commit 56423beef7

View file

@ -22,7 +22,7 @@ setup() {
dir=$(mktemp -d)
mkdir "$dir/kv"
export FAKE_BAO_KV=$dir/kv FAKE_BAO_LOG=$dir/bao.log FAKE_BAO_LOGIN_RC=0
unset FAKE_BAO_DENY_READ FAKE_BAO_DENY_WRITE FAKE_BAO_RACE FAKE_BAO_READ_TIMEOUT FAKE_BAO_READ_5XX FAKE_BAO_READ_DELAY FAKE_BAO_LIST FAKE_BAO_LIST_DENY FAKE_BAO_LIST_SEALED FAKE_BAO_LIST_NOISY PREFETCH
unset FAKE_BAO_DENY_READ FAKE_BAO_DENY_WRITE FAKE_BAO_RACE FAKE_BAO_READ_TIMEOUT FAKE_BAO_READ_5XX FAKE_BAO_READ_DELAY FAKE_BAO_LIST FAKE_BAO_LIST_DENY FAKE_BAO_LIST_SEALED FAKE_BAO_LIST_NOISY FAKE_BAO_LIST_NOMOUNT FAKE_BAO_LIST_DOWN PREFETCH
: >"$FAKE_BAO_LOG"
earlier=$dir/earlier
minted=$dir/minted
@ -335,6 +335,18 @@ run_list secret/swarm/services/archive/users
expect 1 ""
err_has "permission denied"
setup "a token with no access to the mount is an error, with the store's message"
export FAKE_BAO_LIST_NOMOUNT=1
run_list secret/swarm/services/archive/users
expect 1 ""
err_has "preflight capability check returned 403"
setup "a store that is not there is an error, with the store's message"
export FAKE_BAO_LIST_DOWN=1
run_list secret/swarm/services/archive/users
expect 1 ""
err_has "connection refused"
setup "an empty answer with something on stderr is an error"
export FAKE_BAO_LIST_NOISY=1
run_list secret/swarm/services/archive/users