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:
parent
df9cd8c7e6
commit
56423beef7
1 changed files with 18 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue