Skip to content

Commit

Permalink
Specify bucket names to avoid reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
murlock committed Sep 4, 2019
1 parent 88ae76e commit 25c0dd8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/functional/encryption-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export OIO_NS="${OIO_NS:-OPENIO}"
export OIO_ACCOUNT="${OIO_ACCOUNT:-AUTH_demo}"

AWS="aws --endpoint-url http://localhost:5000 --no-verify-ssl"
BUCKET=bucket-$RANDOM
BUCKET=bucket-enc-$RANDOM
ETAG_REGEX='s/(.*ETag.*)([[:xdigit:]]{32})(.*)/\2/p'
WORKDIR=$(mktemp -d -t encryption-tests-XXXX)
OBJ_1_SRC="/etc/magic"
Expand Down
5 changes: 1 addition & 4 deletions tests/functional/s3-acl-metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

AWS="aws --endpoint-url http://localhost:5000 --no-verify-ssl"

BUCKET=bucket-$RANDOM

# AWS="aws --profil amazon"
# BUCKET=openio.michael
BUCKET=bucket-acl-$RANDOM

echo "Bucket name: $BUCKET"

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/s3-conversion-container-hierarchy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -x
set -e
ACCOUNT="AUTH_demo"
BUCKET=bucket-$RANDOM
BUCKET=bucket-conv-$RANDOM
REDIS_CLI="redis-cli"

${REDIS_CLI} set "CS:${ACCOUNT}:${BUCKET}:cnt:v1/" 1
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/s3-versioning-container-hierarchy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LISTING_VERSIONING=$(cat $CONF_GW | grep support_listing_versioning | cut -d= -f

AWS="aws --endpoint-url http://localhost:5000 --no-verify-ssl"

BUCKET="bucket-$RANDOM"
BUCKET="bucket-ch-vers-$RANDOM"

OBJ_0="/etc/magic"
OBJ_1="/etc/passwd"
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/s3-versioning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export OIO_ACCOUNT="${2:-AUTH_demo}"

AWS="aws --endpoint-url http://localhost:5000 --no-verify-ssl"

BUCKET="bucket-$RANDOM"
BUCKET="bucket-vers-$RANDOM"

OBJ_0="/etc/magic"
OBJ_1="/etc/passwd"
Expand Down
8 changes: 4 additions & 4 deletions tests/functional/s3_container_hierarchy_v2.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

AWS="aws --endpoint-url http://localhost:5000 --no-verify-ssl"
BUCKET=bucket-$RANDOM
BUCKET=bucket-ch1-$RANDOM
LISTING_VERSIONING=$(cat $CONF_GW | grep support_listing_versioning | cut -d= -f2 | sed 's/ //g' )

echo "Bucket name: $BUCKET"
Expand Down Expand Up @@ -186,7 +186,7 @@ ${AWS} s3api head-object --bucket ${BUCKET} --key dir1/dir2/

# UTF-8 PATH
# The '?' are caused by "s3 ls": https://github.com/aws/aws-cli/issues/3902
BUCKET_UTF8=bucket-${RANDOM}
BUCKET_UTF8=bucket-utf8-${RANDOM}
${AWS} s3api create-bucket --bucket ${BUCKET_UTF8}
${AWS} s3 cp /etc/passwd s3://${BUCKET_UTF8}/rêve/file
${AWS} s3api head-object --bucket ${BUCKET_UTF8} --key rêve/file
Expand Down Expand Up @@ -226,8 +226,8 @@ ${AWS} s3api delete-bucket --bucket ${BUCKET_UTF8}

# COPY S3<=>S3

BCK1=bucket-${RANDOM}
BCK2=bucket-${RANDOM}
BCK1=bucket-copy-${RANDOM}
BCK2=bucket-copy-${RANDOM}

${AWS} s3api create-bucket --bucket ${BCK1}
${AWS} s3api create-bucket --bucket ${BCK2}
Expand Down

0 comments on commit 25c0dd8

Please sign in to comment.