let the operator's oidc login write the cache's tokens and facts
This commit is contained in:
parent
e0d2350902
commit
f22f4ee6ac
1 changed files with 87 additions and 15 deletions
|
|
@ -207,6 +207,26 @@ expect "pull token unchanged" "$(stored $PULL)" "$pull"
|
|||
expect "push token unchanged" "$(stored $PUSH)" "$push"
|
||||
expect "address, name and key unchanged" "$(stored $URL)$(stored $CACHE)$(stored $KEY)" "http://cache.examplegridgrid:FAKEKEY"
|
||||
|
||||
case="values the operator stored over the minted ones are kept"
|
||||
for leaf in $PULL $PUSH $URL $CACHE $KEY; do
|
||||
printf '%s' "operator-$leaf" >"$dir/store/$leaf"
|
||||
done
|
||||
: >"$calls"
|
||||
run "$PROVISION"
|
||||
expect "exit status" $? 0
|
||||
expect "no token minted" "$(n '^atticadm')" 0
|
||||
expect "nothing written" "$(n '^bao put')" 0
|
||||
expect "the operator's push token is still stored" "$(stored $PUSH)" "operator-$PUSH"
|
||||
expect "the operator's pull token is still stored" "$(stored $PULL)" "operator-$PULL"
|
||||
expect "the operator's address, name and key are still stored" \
|
||||
"$(stored $URL)$(stored $CACHE)$(stored $KEY)" "operator-${URL}operator-${CACHE}operator-${KEY}"
|
||||
expect "the cache lookup used the operator's pull token" "$(n "^attic cache info local:grid | token=operator-$PULL")" 1
|
||||
printf '%s' "$pull" >"$dir/store/$PULL"
|
||||
printf '%s' "$push" >"$dir/store/$PUSH"
|
||||
printf '%s' http://cache.example >"$dir/store/$URL"
|
||||
printf '%s' grid >"$dir/store/$CACHE"
|
||||
printf '%s' grid:FAKEKEY >"$dir/store/$KEY"
|
||||
|
||||
case="an empty server gets its cache back with the stored tokens"
|
||||
rm -f "$dir/cache-exists"
|
||||
: >"$calls"
|
||||
|
|
|
|||
Loading…
Reference in a new issue