Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michele Carpene
Irods Resource Plugin S3
Commits
ff8c34a1
Commit
ff8c34a1
authored
Aug 04, 2016
by
Antoine de Torcy
Browse files
[#1806] Add random chars in bucket name
parent
66f6ddfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
packaging/test_irods_resource_plugin_s3.py
View file @
ff8c34a1
...
...
@@ -6,6 +6,8 @@ import subprocess
import
platform
import
datetime
import
boto3
import
random
import
string
import
sys
if
sys
.
version_info
>=
(
2
,
7
):
...
...
@@ -41,7 +43,8 @@ class Test_Compound_With_S3_Resource(ResourceSuite, ChunkyDevTest, unittest.Test
if
self
.
_testMethodName
.
startswith
(
'test_ssl'
):
self
.
skipTest
(
"skipping ssl tests on ubuntu 12"
)
self
.
s3bucketname
=
'irods-ci-'
+
distro_str
+
datetime
.
datetime
.
utcnow
().
strftime
(
'-%Y-%m-%d.%H-%M-%S-%f'
)
self
.
s3bucketname
=
'irods-ci-'
+
distro_str
+
datetime
.
datetime
.
utcnow
().
strftime
(
'-%Y-%m-%d.%H-%M-%S-%f-'
)
self
.
s3bucketname
+=
''
.
join
(
random
.
choice
(
string
.
letters
)
for
i
in
xrange
(
10
))
self
.
s3bucketname
=
self
.
s3bucketname
[:
63
].
lower
()
# bucket names can be no more than 63 characters long
if
self
.
s3region
==
'us-east-1'
:
self
.
bucket
=
s3
.
create_bucket
(
Bucket
=
self
.
s3bucketname
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment