Skip to content

Commit f9dda05

Browse files
committed
Fix bug: work around missing method in boto3
Signed-off-by: Matthias Büchse <[email protected]>
1 parent 7373c55 commit f9dda05

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Tests/iaas/scs_0123_mandatory_services/mandatory_services.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ def compute_scs_0123_swift_s3(conn: openstack.connection.Connection):
153153
finally:
154154
# Cleanup created S3 bucket
155155
if TESTCONTNAME in s3_buckets:
156-
s3.delete_bucket(Bucket=TESTCONTNAME)
156+
# contrary to Boto docs at
157+
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/delete_bucket.html
158+
# , the following fails with
159+
# AttributeError: 's3.ServiceResource' object has no attribute 'delete_bucket'. Did you mean: 'create_bucket'?
160+
# s3.delete_bucket(Bucket=TESTCONTNAME)
161+
# workaround:
162+
s3.Bucket(name=TESTCONTNAME).delete()
157163
# Clean up ec2 cred IF we created one
158164
remove_leftovers(usable_credentials, conn)

0 commit comments

Comments
 (0)