Skip to content
22 changes: 22 additions & 0 deletions tests/test_commands/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,28 @@
ItemType.REFLEX, ItemType.SPARK_JOB_DEFINITION,
])

import_update_existing_item_success_params = pytest.mark.parametrize("item_type", [
ItemType.DATA_PIPELINE, ItemType.ENVIRONMENT, ItemType.EVENTSTREAM,
ItemType.KQL_DASHBOARD, ItemType.KQL_QUERYSET,
ItemType.MIRRORED_DATABASE, ItemType.NOTEBOOK,
ItemType.REFLEX, ItemType.SPARK_JOB_DEFINITION,
ItemType.COSMOS_DB_DATABASE, ItemType.USER_DATA_FUNCTION
])

import_create_new_item_success_params = pytest.mark.parametrize("item_type", [
ItemType.NOTEBOOK, ItemType.SPARK_JOB_DEFINITION, ItemType.DATA_PIPELINE,
ItemType.REPORT, ItemType.SEMANTIC_MODEL, ItemType.KQL_DATABASE,
ItemType.KQL_QUERYSET, ItemType.EVENTHOUSE, ItemType.MIRRORED_DATABASE,
ItemType.REFLEX, ItemType.KQL_DASHBOARD, ItemType.SQL_DATABASE,
ItemType.COSMOS_DB_DATABASE, ItemType.USER_DATA_FUNCTION
])

import_create_new_item_fail_params = pytest.mark.parametrize("item_type", [
ItemType.DASHBOARD, ItemType.DATAMART, ItemType.LAKEHOUSE,
ItemType.MIRRORED_WAREHOUSE, ItemType.ML_EXPERIMENT, ItemType.ML_MODEL,
ItemType.PAGINATED_REPORT, ItemType.SQL_ENDPOINT, ItemType.WAREHOUSE,
])

# Export command parametrizations
export_item_with_extension_parameters = pytest.mark.parametrize("item_type,expected_file_extension", [
(ItemType.NOTEBOOK, ".ipynb"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.2.0 (None; Linux; aarch64; 6.10.14-linuxkit)
- ms-fabric-cli/1.4.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
Expand All @@ -26,15 +26,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '1152'
- '3069'
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 15 Dec 2025 08:47:10 GMT
- Mon, 23 Feb 2026 09:42:40 GMT
Pragma:
- no-cache
RequestId:
- 5fb857bb-dad0-4d59-8e95-af454d3c1e13
- c2b4981f-4945-4405-85f0-f12f0abe3402
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -60,7 +60,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.2.0 (None; Linux; aarch64; 6.10.14-linuxkit)
- ms-fabric-cli/1.4.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
Expand All @@ -75,15 +75,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '1152'
- '3069'
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 15 Dec 2025 08:47:10 GMT
- Mon, 23 Feb 2026 09:42:40 GMT
Pragma:
- no-cache
RequestId:
- 278050fb-f499-462d-a172-a53340d33673
- 38b90dd6-2f09-44f4-8deb-9f8f0deb640c
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -109,13 +109,13 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.2.0 (None; Linux; aarch64; 6.10.14-linuxkit)
- ms-fabric-cli/1.4.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/capacities
response:
body:
string: '{"value": [{"id": "00000000-0000-0000-0000-000000000004", "displayName":
"mocked_fabriccli_capacity_name", "sku": "F2", "region": "Central US", "state":
"mocked_fabriccli_capacity_name", "sku": "F16", "region": "Central US", "state":
"Active"}]}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -125,15 +125,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '873'
- '429'
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 15 Dec 2025 08:47:15 GMT
- Mon, 23 Feb 2026 09:42:44 GMT
Pragma:
- no-cache
RequestId:
- fe25c410-1bd6-43dc-9d50-76631d2cf4e6
- 1dd5aabc-e0bd-49f1-ac12-a6492c17f310
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down Expand Up @@ -162,12 +162,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.2.0 (None; Linux; aarch64; 6.10.14-linuxkit)
- ms-fabric-cli/1.4.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: POST
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"id": "7c496136-3bd9-4ab1-87de-ca254cb8bb5b", "displayName": "fabriccli_WorkspacePerTestclass_000001",
string: '{"id": "13555eb7-110a-4313-ad26-29d5fdd9eca7", "displayName": "fabriccli_WorkspacePerTestclass_000001",
"description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -177,17 +177,17 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '190'
- '187'
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 15 Dec 2025 08:47:24 GMT
- Mon, 23 Feb 2026 09:42:53 GMT
Location:
- https://api.fabric.microsoft.com/v1/workspaces/7c496136-3bd9-4ab1-87de-ca254cb8bb5b
- https://api.fabric.microsoft.com/v1/workspaces/13555eb7-110a-4313-ad26-29d5fdd9eca7
Pragma:
- no-cache
RequestId:
- db93580e-a242-4252-867f-e17a62c441f4
- 285ecca2-c93a-4568-bfb9-5391712dd37c
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -213,13 +213,13 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.2.0 (import; Linux; aarch64; 6.10.14-linuxkit)
- ms-fabric-cli/1.4.0 (import; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
"My workspace", "description": "", "type": "Personal"}, {"id": "7c496136-3bd9-4ab1-87de-ca254cb8bb5b",
"My workspace", "description": "", "type": "Personal"}, {"id": "13555eb7-110a-4313-ad26-29d5fdd9eca7",
"displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created
by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}'
headers:
Expand All @@ -230,15 +230,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '1187'
- '3104'
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 15 Dec 2025 08:47:48 GMT
- Mon, 23 Feb 2026 09:44:14 GMT
Pragma:
- no-cache
RequestId:
- 411459f1-70f4-45b8-9b2a-40b505190b40
- f2790c81-70ea-44ff-87f9-317062bb5c47
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -264,12 +264,14 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.2.0 (import; Linux; aarch64; 6.10.14-linuxkit)
- ms-fabric-cli/1.4.0 (import; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces/7c496136-3bd9-4ab1-87de-ca254cb8bb5b/items
uri: https://api.fabric.microsoft.com/v1/workspaces/13555eb7-110a-4313-ad26-29d5fdd9eca7/items
response:
body:
string: '{"value": []}'
string: '{"value": [{"id": "89731e68-ebbc-43d7-8ef6-15a6eccbb627", "type": "Notebook",
"displayName": "fabcli000001_new_2", "description": "Imported from fab", "workspaceId":
"13555eb7-110a-4313-ad26-29d5fdd9eca7"}]}'
headers:
Access-Control-Expose-Headers:
- RequestId
Expand All @@ -278,15 +280,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '32'
- '184'
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 15 Dec 2025 08:47:49 GMT
- Mon, 23 Feb 2026 09:44:15 GMT
Pragma:
- no-cache
RequestId:
- 0e2c4aa3-640e-4fea-94d6-739f1904563c
- ec67340a-a49e-417c-8d00-ac0170f21165
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down Expand Up @@ -314,9 +316,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.2.0 (import; Linux; aarch64; 6.10.14-linuxkit)
- ms-fabric-cli/1.4.0 (import; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: DELETE
uri: https://api.fabric.microsoft.com/v1/workspaces/7c496136-3bd9-4ab1-87de-ca254cb8bb5b
uri: https://api.fabric.microsoft.com/v1/workspaces/13555eb7-110a-4313-ad26-29d5fdd9eca7
response:
body:
string: ''
Expand All @@ -332,11 +334,11 @@ interactions:
Content-Type:
- application/octet-stream
Date:
- Mon, 15 Dec 2025 08:47:50 GMT
- Mon, 23 Feb 2026 09:44:16 GMT
Pragma:
- no-cache
RequestId:
- cf0e88ef-5222-46f8-9fe7-cd06b42fe6ae
- fb496a5c-a4f3-4943-a641-429f6c26213a
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down
Loading
Loading