From 3169f40b5a6908eab36717ef99fcb7f5fba57f67 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 3 Nov 2017 09:20:35 +0100 Subject: [PATCH] regress: Tweak scripts/cleanup with FORCE_CLOUD to not report an error Sometime, the test finishes with the follwing: ===== bsr-opt-test Bacula source OK 21:31:22 ===== Missing access_key Missing access_key => exit status != 0 --- regress/scripts/cleanup | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/regress/scripts/cleanup b/regress/scripts/cleanup index 9f5fbbb53f..148d1024a3 100755 --- a/regress/scripts/cleanup +++ b/regress/scripts/cleanup @@ -66,4 +66,42 @@ if [ x$FORCE_CLOUD = xyes ]; then aws configure set default.s3.signature_version s3v4 aws s3 rm s3://${CLOUD_BUCKETNAME} $endpoint --recursive --include 'TestVol*' --include 'Vol*' $region 2>/dev/null >/dev/null fi + if [ x${CLOUD_BUCKETNAME} != x ]; then + args="${args} -n ${CLOUD_BUCKETNAME}" + fi + if [ x${CLOUD_ACCESSKEY} != x ]; then + args="${args} -a ${CLOUD_ACCESSKEY}" + fi + if [ x${CLOUD_SECRETKEY} != x ]; then + args="${args} -s ${CLOUD_SECRETKEY}" + fi + if [ x${CLOUD_PROTOCOL} != x ]; then + args="${args} -p ${CLOUD_PROTOCOL}" + fi + if [ x${CLOUD_REGION} != x ]; then + args="${args} -r ${CLOUD_REGION}" + fi + if [ x${CLOUD_DRIVER} != x ]; then + args="${args} -y ${CLOUD_DRIVER}" + fi + if [ x${CLOUD_URISTYLE} != x ]; then + args="${args} -u ${CLOUD_URISTYLE}" + fi + if [ x${CLOUD_BLOBENDPOINT} != x ]; then + args="${args} -b ${CLOUD_BLOBENDPOINT}" + fi + if [ x${CLOUD_TABLEENDPOINT} != x ]; then + args="${args} -t ${CLOUD_TABLEENDPOINT}" + fi + if [ x${CLOUD_QUEUEENDPOINT} != x ]; then + args="${args} -q ${CLOUD_QUEUEENDPOINT}" + fi + ${bin}/bcloud ${args} -v 'Vol' clean + ${bin}/bcloud ${args} -v 'vol' clean + ${bin}/bcloud ${args} -v 'TestVol' clean + ${bin}/bcloud ${args} -v 'Small' clean + ${bin}/bcloud ${args} -v 'TEST' clean + ${bin}/bcloud ${args} -v 'Backup-' clean + # Might report incorrect error if not setup correctly + true fi -- 2.39.5