From 54c3a023f0febb68824be51a9b35a2457373ad07 Mon Sep 17 00:00:00 2001 From: Quentin Date: Sun, 29 Nov 2020 17:27:49 +0100 Subject: Use aws cli version 2 --- script/test-smoke.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'script/test-smoke.sh') diff --git a/script/test-smoke.sh b/script/test-smoke.sh index 7b462b00..7faf2a07 100755 --- a/script/test-smoke.sh +++ b/script/test-smoke.sh @@ -15,8 +15,8 @@ source ${SCRIPT_FOLDER}/dev-env.sh dd if=/dev/urandom of=/tmp/garage.rnd bs=1M count=10 -s3grg put /tmp/garage.rnd s3://eprouvette/ +s3grg cp /tmp/garage.rnd s3://eprouvette/ s3grg ls s3://eprouvette -s3grg get s3://eprouvette/garage.rnd /tmp/garage.dl +s3grg cp s3://eprouvette/garage.rnd /tmp/garage.dl diff /tmp/garage.rnd /tmp/garage.dl -- cgit v1.2.3 From 086e5be290b329b898206397ad95c82964fbf499 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 17 Dec 2020 21:04:59 +0100 Subject: Update testing script --- script/test-smoke.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'script/test-smoke.sh') diff --git a/script/test-smoke.sh b/script/test-smoke.sh index 111afac9..a2ffcea1 100755 --- a/script/test-smoke.sh +++ b/script/test-smoke.sh @@ -6,6 +6,7 @@ shopt -s expand_aliases SCRIPT_FOLDER="`dirname \"$0\"`" REPO_FOLDER="${SCRIPT_FOLDER}/../" +echo "setup" cargo build ${SCRIPT_FOLDER}/dev-clean.sh ${SCRIPT_FOLDER}/dev-cluster.sh > /tmp/garage.log 2>&1 & @@ -22,6 +23,7 @@ dd if=/dev/urandom of=/tmp/garage.1.rnd bs=1k count=2 # < INLINE_THRESHOLD = 307 dd if=/dev/urandom of=/tmp/garage.2.rnd bs=1M count=5 dd if=/dev/urandom of=/tmp/garage.3.rnd bs=1M count=10 +echo "s3 api testing..." for idx in $(seq 1 3); do # AWS sends awsgrg cp /tmp/garage.$idx.rnd s3://eprouvette/garage.$idx.aws @@ -55,6 +57,18 @@ for idx in $(seq 1 3); do done rm /tmp/garage.{1,2,3}.rnd +echo "website testing" +echo "

hello world

" > /tmp/garage-index.html +awsgrg cp /tmp/garage-index.html s3://eprouvette/index.html +[ `curl -s -o /dev/null -w "%{http_code}" --header "Host: eprouvette.garage.tld" http://127.0.0.1:3923/ ` == 404 ] +garage bucket website --allow eprouvette +[ `curl -s -o /dev/null -w "%{http_code}" --header "Host: eprouvette.garage.tld" http://127.0.0.1:3923/ ` == 200 ] +garage bucket website --deny eprouvette +[ `curl -s -o /dev/null -w "%{http_code}" --header "Host: eprouvette.garage.tld" http://127.0.0.1:3923/ ` == 404 ] +awsgrg rm s3://eprouvette/index.html +rm /tmp/garage-index.html + +echo "teardown" garage bucket deny --read --write eprouvette --key $AWS_ACCESS_KEY_ID garage bucket delete --yes eprouvette garage key delete --yes $AWS_ACCESS_KEY_ID -- cgit v1.2.3