Skip to content

Commit 19e7003

Browse files
committed
update integration tests to pass minio details to api
1 parent 5b5daf6 commit 19e7003

1 file changed

Lines changed: 63 additions & 9 deletions

File tree

tests/test_integration.py

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,13 @@ def test_no_rocrate_for_validation():
104104

105105
# The API expects the JSON to be passed as a string
106106
payload = {
107-
"minio_bucket" : "ro-crates"
107+
"minio_config": {
108+
"endpoint": "minio:9000",
109+
"accesskey": "minioadmin",
110+
"secret": "minioadmin",
111+
"ssl": False,
112+
"bucket": "ro-crates"
113+
}
108114
}
109115

110116
response = requests.post(url, json=payload, headers=headers)
@@ -130,7 +136,13 @@ def test_no_validation_result_for_missing_crate():
130136

131137
# The API expects the JSON to be passed as a string
132138
payload = {
133-
"minio_bucket" : "ro-crates"
139+
"minio_config": {
140+
"endpoint": "minio:9000",
141+
"accesskey": "minioadmin",
142+
"secret": "minioadmin",
143+
"ssl": False,
144+
"bucket": "ro-crates"
145+
}
134146
}
135147

136148
# GET action and tests
@@ -156,7 +168,13 @@ def test_get_existing_validation_result():
156168

157169
# The API expects the JSON to be passed as a string
158170
payload = {
159-
"minio_bucket" : "ro-crates"
171+
"minio_config": {
172+
"endpoint": "minio:9000",
173+
"accesskey": "minioadmin",
174+
"secret": "minioadmin",
175+
"ssl": False,
176+
"bucket": "ro-crates"
177+
}
160178
}
161179

162180
# GET action and tests
@@ -182,7 +200,13 @@ def test_rocrate_not_validated_yet():
182200

183201
# The API expects the JSON to be passed as a string
184202
payload = {
185-
"minio_bucket" : "ro-crates"
203+
"minio_config": {
204+
"endpoint": "minio:9000",
205+
"accesskey": "minioadmin",
206+
"secret": "minioadmin",
207+
"ssl": False,
208+
"bucket": "ro-crates"
209+
}
186210
}
187211

188212
# GET action and tests
@@ -209,7 +233,13 @@ def test_zipped_rocrate_validation():
209233

210234
# The API expects the JSON to be passed as a string
211235
payload = {
212-
"minio_bucket" : "ro-crates"
236+
"minio_config": {
237+
"endpoint": "minio:9000",
238+
"accesskey": "minioadmin",
239+
"secret": "minioadmin",
240+
"ssl": False,
241+
"bucket": "ro-crates"
242+
}
213243
}
214244

215245
# POST action and tests
@@ -266,7 +296,13 @@ def test_directory_rocrate_validation():
266296

267297
# The API expects the JSON to be passed as a string
268298
payload = {
269-
"minio_bucket" : "ro-crates"
299+
"minio_config": {
300+
"endpoint": "minio:9000",
301+
"accesskey": "minioadmin",
302+
"secret": "minioadmin",
303+
"ssl": False,
304+
"bucket": "ro-crates"
305+
}
270306
}
271307

272308
# POST action and tests
@@ -322,7 +358,13 @@ def test_ignore_rocrates_not_on_basepath():
322358

323359
# The API expects the JSON to be passed as a string
324360
payload = {
325-
"minio_bucket" : "ro-crates"
361+
"minio_config": {
362+
"endpoint": "minio:9000",
363+
"accesskey": "minioadmin",
364+
"secret": "minioadmin",
365+
"ssl": False,
366+
"bucket": "ro-crates"
367+
}
326368
}
327369

328370
# POST action and tests
@@ -350,7 +392,13 @@ def test_zipped_rocrate_in_subdirectory_validation():
350392

351393
# The API expects the JSON to be passed as a string
352394
payload = {
353-
"minio_bucket" : "ro-crates",
395+
"minio_config": {
396+
"endpoint": "minio:9000",
397+
"accesskey": "minioadmin",
398+
"secret": "minioadmin",
399+
"ssl": False,
400+
"bucket": "ro-crates"
401+
},
354402
"root_path" : subdir_path
355403
}
356404

@@ -409,7 +457,13 @@ def test_directory_rocrate_in_subdirectory_validation():
409457

410458
# The API expects the JSON to be passed as a string
411459
payload = {
412-
"minio_bucket" : "ro-crates",
460+
"minio_config": {
461+
"endpoint": "minio:9000",
462+
"accesskey": "minioadmin",
463+
"secret": "minioadmin",
464+
"ssl": False,
465+
"bucket": "ro-crates"
466+
},
413467
"root_path" : subdir_path
414468
}
415469

0 commit comments

Comments
 (0)