Skip to content

Commit b66117d

Browse files
committed
chore: add test for envidat global data connectors
1 parent 1a76542 commit b66117d

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
@@ -2458,3 +2458,20 @@ async def test_validate_envidat_data_connector() -> None:
24582458
assert res.doi is not None
24592459
assert res.publisher_url is not None
24602460
assert res.publisher_name is not None
2461+
2462+
2463+
async def test_add_envidat_data_connector(sanic_client: SanicASGITestClient, user_headers) -> None:
2464+
payload = {
2465+
"storage": {
2466+
"configuration": {"type": "doi", "doi": "10.16904/envidat.716"},
2467+
"source_path": "/",
2468+
"target_path": "/",
2469+
"readonly": True,
2470+
}
2471+
}
2472+
_, res = await sanic_client.post("/api/data/data_connectors/global", json=payload, headers=user_headers)
2473+
assert res.status_code == 201
2474+
assert res.json.get("doi") is not None
2475+
assert res.json.get("publisher_name") is not None
2476+
assert res.json.get("publisher_name").lower() == "envidat"
2477+
assert res.json.get("publisher_url") is not None

0 commit comments

Comments
 (0)