]> git.sur5r.net Git - bacula/bacula/commitdiff
regress: Tweak scripts/cleanup with FORCE_CLOUD to not report an error
authorEric Bollengier <eric@baculasystems.com>
Fri, 3 Nov 2017 08:20:35 +0000 (09:20 +0100)
committerKern Sibbald <kern@sibbald.com>
Sun, 12 Nov 2017 10:41:38 +0000 (11:41 +0100)
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

index 9f5fbbb53f65c1db30bd4ac8f1a9d021b0ebb541..148d1024a34c9ec0d0404d730e35dedd0f75a6c0 100755 (executable)
@@ -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