Skip to content

Commit 92bbfcb

Browse files
committed
bench: harden cli-core encrypted ls visibility check
1 parent a815169 commit 92bbfcb

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎scripts/e2e-cli-core-test.sh‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,16 @@ mkdir -p "${MOUNT_SRC_DIR}"
199199
printf 'mount-initial-%s\n' "${RUN_SHA}" > "${MOUNT_SRC_DIR}/file.txt"
200200
"${CLI}" save --no-platform --no-git "${WORKSPACE}" "${TAG_MOUNT}:${MOUNT_SRC_DIR}" > "${CLI_LOG_DIR}/mount-save.log"
201201

202-
"${CLI}" ls "${WORKSPACE}" --limit 50 --json > "${CLI_LOG_DIR}/ls-after-encryption.json"
203-
if ! jq -e --arg tag "${TAG_MOUNT}" '.entries[]? | select(.tag == $tag and .encrypted == true)' "${CLI_LOG_DIR}/ls-after-encryption.json" >/dev/null; then
202+
encrypted_visible=0
203+
for _ in $(seq 1 10); do
204+
"${CLI}" ls "${WORKSPACE}" --limit 500 --json > "${CLI_LOG_DIR}/ls-after-encryption.json"
205+
if jq -e --arg tag "${TAG_MOUNT}" '.entries[]? | select(.tag == $tag and .encrypted == true)' "${CLI_LOG_DIR}/ls-after-encryption.json" >/dev/null; then
206+
encrypted_visible=1
207+
break
208+
fi
209+
sleep 1
210+
done
211+
if [[ "${encrypted_visible}" != "1" ]]; then
204212
echo "encrypted entry for ${TAG_MOUNT} was not visible in ls output"
205213
cat "${CLI_LOG_DIR}/ls-after-encryption.json"
206214
exit 1

0 commit comments

Comments
 (0)