Skip to content

Commit ad83431

Browse files
committed
change path
1 parent 56d06f3 commit ad83431

File tree

2 files changed

+86
-51
lines changed

2 files changed

+86
-51
lines changed

services/api-server/tests/unit/conftest.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,18 @@ async def client(
121121
#
122122

123123
# LifespanManager will trigger app's startup&shutown event handlers
124-
async with LifespanManager(
125-
app,
126-
startup_timeout=None if is_pdb_enabled else MAX_TIME_FOR_APP_TO_STARTUP,
127-
shutdown_timeout=None if is_pdb_enabled else MAX_TIME_FOR_APP_TO_SHUTDOWN,
128-
), httpx.AsyncClient(
129-
base_url="http://api.testserver.io",
130-
headers={"Content-Type": "application/json"},
131-
transport=ASGITransport(app=app),
132-
) as httpx_async_client:
124+
async with (
125+
LifespanManager(
126+
app,
127+
startup_timeout=None if is_pdb_enabled else MAX_TIME_FOR_APP_TO_STARTUP,
128+
shutdown_timeout=None if is_pdb_enabled else MAX_TIME_FOR_APP_TO_SHUTDOWN,
129+
),
130+
httpx.AsyncClient(
131+
base_url="http://api.testserver.io",
132+
headers={"Content-Type": "application/json"},
133+
transport=ASGITransport(app=app),
134+
) as httpx_async_client,
135+
):
133136
assert isinstance(httpx_async_client, httpx.AsyncClient)
134137
yield httpx_async_client
135138

@@ -242,11 +245,8 @@ def webserver_service_openapi_specs(
242245
def storage_service_openapi_specs(
243246
osparc_simcore_services_dir: Path,
244247
) -> dict[str, Any]:
245-
openapi_path = (
246-
osparc_simcore_services_dir
247-
/ "storage/src/simcore_service_storage/api/v0/openapi.yaml"
248-
)
249-
return yaml.safe_load(openapi_path.read_text())
248+
openapi_path = osparc_simcore_services_dir / "storage" / "openapi.json"
249+
return json.loads(openapi_path.read_text())
250250

251251

252252
@pytest.fixture

services/storage/openapi.json

Lines changed: 72 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@
382382
},
383383
{
384384
"$ref": "#/components/schemas/Envelope_FileMetaDataGetv010_"
385+
},
386+
{
387+
"$ref": "#/components/schemas/Envelope_dict_"
385388
}
386389
],
387390
"title": "Response Get File Metadata V0 Locations Location Id Files File Id Metadata Get"
@@ -886,7 +889,7 @@
886889
"content": {
887890
"application/json": {
888891
"schema": {
889-
"$ref": "#/components/schemas/FileUploadCompleteFutureResponse"
892+
"$ref": "#/components/schemas/Envelope_FileUploadCompleteFutureResponse_"
890893
}
891894
}
892895
}
@@ -958,7 +961,7 @@
958961
"content": {
959962
"application/json": {
960963
"schema": {
961-
"$ref": "#/components/schemas/FileMetaDataGet"
964+
"$ref": "#/components/schemas/Envelope_FileMetaDataGet_"
962965
}
963966
}
964967
}
@@ -1027,15 +1030,28 @@
10271030
],
10281031
"summary": "Copy Folders From Project",
10291032
"operationId": "copy_folders_from_project_v0_simcore_s3_folders_post",
1033+
"parameters": [
1034+
{
1035+
"name": "user_id",
1036+
"in": "query",
1037+
"required": true,
1038+
"schema": {
1039+
"type": "integer",
1040+
"exclusiveMinimum": true,
1041+
"title": "User Id",
1042+
"minimum": 0
1043+
}
1044+
}
1045+
],
10301046
"requestBody": {
1047+
"required": true,
10311048
"content": {
10321049
"application/json": {
10331050
"schema": {
1034-
"$ref": "#/components/schemas/Body_copy_folders_from_project_v0_simcore_s3_folders_post"
1051+
"$ref": "#/components/schemas/FoldersBody"
10351052
}
10361053
}
1037-
},
1038-
"required": true
1054+
}
10391055
},
10401056
"responses": {
10411057
"202": {
@@ -1304,22 +1320,6 @@
13041320
],
13051321
"title": "AppStatusCheck"
13061322
},
1307-
"Body_copy_folders_from_project_v0_simcore_s3_folders_post": {
1308-
"properties": {
1309-
"query_params": {
1310-
"$ref": "#/components/schemas/StorageQueryParamsBase"
1311-
},
1312-
"body": {
1313-
"$ref": "#/components/schemas/FoldersBody"
1314-
}
1315-
},
1316-
"type": "object",
1317-
"required": [
1318-
"query_params",
1319-
"body"
1320-
],
1321-
"title": "Body_copy_folders_from_project_v0_simcore_s3_folders_post"
1322-
},
13231323
"DatasetMetaDataGet": {
13241324
"properties": {
13251325
"dataset_id": {
@@ -1448,6 +1448,31 @@
14481448
"type": "object",
14491449
"title": "Envelope[FileMetaDataGetv010]"
14501450
},
1451+
"Envelope_FileUploadCompleteFutureResponse_": {
1452+
"properties": {
1453+
"data": {
1454+
"anyOf": [
1455+
{
1456+
"$ref": "#/components/schemas/FileUploadCompleteFutureResponse"
1457+
},
1458+
{
1459+
"type": "null"
1460+
}
1461+
]
1462+
},
1463+
"error": {
1464+
"anyOf": [
1465+
{},
1466+
{
1467+
"type": "null"
1468+
}
1469+
],
1470+
"title": "Error"
1471+
}
1472+
},
1473+
"type": "object",
1474+
"title": "Envelope[FileUploadCompleteFutureResponse]"
1475+
},
14511476
"Envelope_FileUploadCompleteResponse_": {
14521477
"properties": {
14531478
"data": {
@@ -1598,6 +1623,32 @@
15981623
"type": "object",
15991624
"title": "Envelope[TaskGet]"
16001625
},
1626+
"Envelope_dict_": {
1627+
"properties": {
1628+
"data": {
1629+
"anyOf": [
1630+
{
1631+
"type": "object"
1632+
},
1633+
{
1634+
"type": "null"
1635+
}
1636+
],
1637+
"title": "Data"
1638+
},
1639+
"error": {
1640+
"anyOf": [
1641+
{},
1642+
{
1643+
"type": "null"
1644+
}
1645+
],
1646+
"title": "Error"
1647+
}
1648+
},
1649+
"type": "object",
1650+
"title": "Envelope[dict]"
1651+
},
16011652
"Envelope_list_DatasetMetaDataGet__": {
16021653
"properties": {
16031654
"data": {
@@ -2269,22 +2320,6 @@
22692320
],
22702321
"title": "SoftCopyBody"
22712322
},
2272-
"StorageQueryParamsBase": {
2273-
"properties": {
2274-
"user_id": {
2275-
"type": "integer",
2276-
"exclusiveMinimum": true,
2277-
"title": "User Id",
2278-
"minimum": 0
2279-
}
2280-
},
2281-
"additionalProperties": false,
2282-
"type": "object",
2283-
"required": [
2284-
"user_id"
2285-
],
2286-
"title": "StorageQueryParamsBase"
2287-
},
22882323
"TaskGet": {
22892324
"properties": {
22902325
"task_id": {

0 commit comments

Comments
 (0)