Skip to content

Commit 8b54ad1

Browse files
committed
Update test_s3 to work for undockerized testing
1 parent 61dab59 commit 8b54ad1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

LNX-docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ services:
7979
set -e
8080
wget -P /home/dja/.local/bin/ https://dl.min.io/client/mc/release/linux-amd64/mc
8181
chmod +x /home/dja/.local/bin/mc
82-
mc alias set myminio/ http://minio:9000 datajoint datajoint
8382
pip install --user -r test_requirements.txt
8483
pip install -e .
8584
pip freeze | grep datajoint

local-docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ services:
8484
set -e
8585
wget -P /home/dja/.local/bin/ https://dl.min.io/client/mc/release/linux-amd64/mc
8686
chmod +x /home/dja/.local/bin/mc
87-
mc alias set myminio/ http://minio:9000 datajoint datajoint
8887
pip install --user nose nose-cov coveralls flake8 ptvsd
8988
pip install -e .
9089
pip freeze | grep datajoint

tests/test_s3.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ def test_remove_object_exception():
108108
with open('/tmp/policy.json', 'w') as f:
109109
f.write(json.dumps(testpolicy))
110110

111+
# Add alias myminio
112+
os.system('mc alias set myminio/ http://fakeservices.datajoint.io datajoint datajoint')
113+
111114
# Add the policy and apply it to the user
112115
os.system('mc admin policy add myminio test /tmp/policy.json')
113116
os.system('mc admin policy set myminio test user=jeffjeff')
@@ -133,7 +136,7 @@ def test_remove_object_exception():
133136
schema.external['share'].s3.client = old_client
134137
schema.external['share'].delete(delete_external_files=True)
135138
os.remove("/tmp/policy.json")
136-
139+
os.system('mc alias remove myminio/')
137140
# Raise the error we want if the error matches the expected uuid
138141
if str(error_list[0][0]) == str(uuid_from_buffer(pack(test[1]))):
139142
raise error_list[0][2]

0 commit comments

Comments
 (0)