Skip to content

Commit

Permalink
t/test: small quality of life reminders
Browse files Browse the repository at this point in the history
1. remind testers to clean state under /tmp
2. add a comment re using mc to introspect data stored in minio
  • Loading branch information
pkhuong committed Jan 23, 2024
1 parent 4bcc767 commit 5dea95c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions t/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ trap cleanup EXIT
mkdir -p minio
rm -rf minio/*

# We use minio to spin up a local s3-compatible service on localhost:7777
#
# The data files in the data volume aren't as simple as they once were; the
# easiest way to see what's stored in the local buckets is probably
#
# $ docker run --security-opt label=disable -v ./escape-hatch:/out --net=host -it --entrypoint=/bin/sh docker.io/minio/mc
# sh-5.1# mc alias set verneuil http://localhost:7777 VERNEUIL_TEST_ACCOUNT VERNEUIL_TEST_KEY
# sh-5.1# mc ls verneuil # etc.
EXTRA_DOCKER_ARGS=${EXTRA_DOCKER_ARGS:-}
if docker info | grep -q 'rootless: true' ; then
# rootless, no need for fancy user mapping, and also can't assume
Expand All @@ -98,6 +106,9 @@ docker run --net=host $EXTRA_DOCKER_ARGS \
-e "MINIO_ROOT_PASSWORD=VERNEUIL_TEST_KEY" \
docker.io/minio/minio server --address 127.0.0.1:7777 /data &

# Leftover state shouldn't result in incorrect replication, but does trigger extra assertions
# that assume a clean initial state.
echo "About to run integration tests. Remember to clear leftover state under '/tmp/verneuil-*' if running with extra (read) validation."
sleep 5;

OFFLINE_CONFIG=$(cat <<'EOF'
Expand Down

0 comments on commit 5dea95c

Please sign in to comment.