Skip to content

Commit 25cac24

Browse files
committed
Fix logic to directly apply the minio client.
1 parent cf2b75a commit 25cac24

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tests/test_s3.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ def test_connection_secure():
6060
def test_remove_object_exception():
6161
# https://github.com/datajoint/datajoint-python/issues/952
6262

63-
# Initialize minioClient with an endpoint and access/secret keys.
64-
minio_client = Minio(
65-
'minio:9000',
66-
access_key='jeffjeff',
67-
secret_key='jeffjeff',
68-
secure=False)
69-
7063
# Insert some test data and remove it so that the external table is populated
7164
test = [1, [1, 2, 3]]
7265
SimpleRemote.insert1(test)
@@ -76,7 +69,11 @@ def test_remove_object_exception():
7669
old_client = schema.external['share'].s3.client
7770

7871
# Apply our new minio client which has a user that does not exist
79-
schema.external['share'].s3.client = minio_client
72+
schema.external['share'].s3.client = Minio(
73+
'minio:9000',
74+
access_key='jeffjeff',
75+
secret_key='jeffjeff',
76+
secure=False)
8077

8178
# This method returns a list of errors
8279
error_list = schema.external['share'].delete(delete_external_files=True,

0 commit comments

Comments
 (0)