Skip to content

Commit 52d2070

Browse files
committed
chore: add test for envidat global data connectors
1 parent eecf290 commit 52d2070

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/bases/renku_data_services/data_api/test_data_connectors.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2516,3 +2516,20 @@ async def test_validate_envidat_data_connector() -> None:
25162516
assert res.doi is not None
25172517
assert res.publisher_url is not None
25182518
assert res.publisher_name is not None
2519+
2520+
2521+
async def test_add_envidat_data_connector(sanic_client: SanicASGITestClient, user_headers) -> None:
2522+
payload = {
2523+
"storage": {
2524+
"configuration": {"type": "doi", "doi": "10.16904/envidat.716"},
2525+
"source_path": "/",
2526+
"target_path": "/",
2527+
"readonly": True,
2528+
}
2529+
}
2530+
_, res = await sanic_client.post("/api/data/data_connectors/global", json=payload, headers=user_headers)
2531+
assert res.status_code == 201
2532+
assert res.json.get("doi") is not None
2533+
assert res.json.get("publisher_name") is not None
2534+
assert res.json.get("publisher_name").lower() == "envidat"
2535+
assert res.json.get("publisher_url") is not None

0 commit comments

Comments
 (0)