@@ -156,7 +156,7 @@ def test_authenticated_gateway(random_zarr_dataset: tuple[str, xr.Dataset]):
156
156
hamt = HAMT (
157
157
store = IPFSStore (
158
158
# Reverse proxy on port 5002
159
- rpc_uri_stem = "http://127.0.0.1:5002" ,
159
+ rpc_uri_stem = "http://127.0.0.1:5002" ,
160
160
api_key = "test" ,
161
161
),
162
162
transformer_encode = encrypt ,
@@ -171,20 +171,19 @@ def test_authenticated_gateway(random_zarr_dataset: tuple[str, xr.Dataset]):
171
171
# Test with wrong API Key
172
172
with pytest .raises (Exception ):
173
173
hamt = HAMT (
174
- store = IPFSStore (
175
- rpc_uri_stem = "http://127.0.0.1:5002" ,
174
+ store = IPFSStore (
175
+ rpc_uri_stem = "http://127.0.0.1:5002" ,
176
176
api_key = "badKey" ,
177
177
),
178
178
transformer_encode = encrypt ,
179
179
transformer_decode = decrypt ,
180
180
)
181
181
182
-
183
182
# Test with just bearer_token key
184
183
hamt = HAMT (
185
- store = IPFSStore (
184
+ store = IPFSStore (
186
185
bearer_token = "test" ,
187
- rpc_uri_stem = "http://127.0.0.1:5002" ,
186
+ rpc_uri_stem = "http://127.0.0.1:5002" ,
188
187
),
189
188
transformer_encode = encrypt ,
190
189
transformer_decode = decrypt ,
@@ -198,19 +197,19 @@ def test_authenticated_gateway(random_zarr_dataset: tuple[str, xr.Dataset]):
198
197
# Test with wrong bearer
199
198
with pytest .raises (Exception ):
200
199
hamt = HAMT (
201
- store = IPFSStore (
200
+ store = IPFSStore (
202
201
bearer_token = "wrongBearer" ,
203
- rpc_uri_stem = "http://127.0.0.1:5002" ,
202
+ rpc_uri_stem = "http://127.0.0.1:5002" ,
204
203
),
205
204
transformer_encode = encrypt ,
206
205
transformer_decode = decrypt ,
207
206
)
208
207
209
208
# Test with just basic auth
210
209
hamt = HAMT (
211
- store = IPFSStore (
210
+ store = IPFSStore (
212
211
basic_auth = ("test" , "test" ),
213
- rpc_uri_stem = "http://127.0.0.1:5002" ,
212
+ rpc_uri_stem = "http://127.0.0.1:5002" ,
214
213
),
215
214
transformer_encode = encrypt ,
216
215
transformer_decode = decrypt ,
@@ -224,9 +223,9 @@ def test_authenticated_gateway(random_zarr_dataset: tuple[str, xr.Dataset]):
224
223
# Test with wrong basic auth
225
224
with pytest .raises (Exception ):
226
225
hamt = HAMT (
227
- store = IPFSStore (
226
+ store = IPFSStore (
228
227
basic_auth = ("wrong" , "wrong" ),
229
- rpc_uri_stem = "http://127.0.0.1:5002" ,
228
+ rpc_uri_stem = "http://127.0.0.1:5002" ,
230
229
),
231
230
transformer_encode = encrypt ,
232
231
transformer_decode = decrypt ,
0 commit comments