diff --git a/vezha/smoke.sh b/vezha/smoke.sh index ac21057d..111106a1 100644 --- a/vezha/smoke.sh +++ b/vezha/smoke.sh @@ -91,23 +91,23 @@ make_objects() { } write_two_versions() { - mcr mb s/b1 - mcr version enable s/b1 - mcr_in pipe s/b1/key < "$T/o1" - mcr_in pipe s/b1/key < "$T/o2" + mcr mb s/vbkt + mcr version enable s/vbkt + mcr_in pipe s/vbkt/key < "$T/o1" + mcr_in pipe s/vbkt/key < "$T/o2" } read_back_versions() { - got=$(mcr cat s/b1/key | sha256sum | cut -d' ' -f1) + got=$(mcr cat s/vbkt/key | sha256sum | cut -d' ' -f1) [ "$got" = "$S2" ] || fail "cat of the key is $got, expected the second object $S2" - mcr ls --versions --json s/b1/key > "$T/ls.json" + mcr ls --versions --json s/vbkt/key > "$T/ls.json" count=$(jq -s '[.[] | select(.versionId != null)] | length' "$T/ls.json") [ "$count" = 2 ] || fail "ls --versions shows $count versions, expected 2" distinct=$(jq -s '[.[] | select(.versionId != null) | .versionId] | unique | length' "$T/ls.json") [ "$distinct" = 2 ] || fail "the two versions share a versionId" old=$(jq -rs '[.[] | select(.versionId != null and .isLatest != true) | .versionId] | .[0] // ""' "$T/ls.json") [ -n "$old" ] || fail "no non-latest version in ls --versions" - got=$(mcr cat --version-id "$old" s/b1/key | sha256sum | cut -d' ' -f1) + got=$(mcr cat --version-id "$old" s/vbkt/key | sha256sum | cut -d' ' -f1) [ "$got" = "$S1" ] || fail "cat --version-id of the first version is $got, expected the first object $S1" echo "smoke: two versions read back by versionId with matching sha256" } @@ -131,10 +131,10 @@ case $mode in read_back_versions mcr admin user add s ro "$RO_SECRET" > /dev/null mcr admin policy attach s readonly --user ro > /dev/null - got=$(mcr_ro cat r/b1/key | sha256sum | cut -d' ' -f1) + got=$(mcr_ro cat r/vbkt/key | sha256sum | cut -d' ' -f1) [ "$got" = "$S2" ] || fail "the read-only user cannot read the key" code=0 - mcr_ro_in pipe r/b1/denied < "$T/o1" > "$T/put.out" 2>&1 || code=$? + mcr_ro_in pipe r/vbkt/denied < "$T/o1" > "$T/put.out" 2>&1 || code=$? sh "$GATES" put-denied "$code" "$T/put.out" echo "smoke: the read-only user's PUT is denied" for n in 1 2; do