Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions tests/test_commands/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
)
from tests.test_commands.utils import cli_path_join, set_vcr_mode_env

item_type_paramerter = pytest.mark.parametrize("item_type", [
ALL_ITEM_TYPES = [
ItemType.DATA_PIPELINE,
ItemType.ENVIRONMENT, ItemType.EVENTHOUSE, ItemType.EVENTSTREAM,
ItemType.KQL_DASHBOARD, ItemType.KQL_QUERYSET,
Expand All @@ -52,7 +52,9 @@
ItemType.SPARK_JOB_DEFINITION, ItemType.WAREHOUSE, ItemType.COPYJOB,
ItemType.GRAPHQLAPI, ItemType.DATAFLOW, ItemType.COSMOS_DB_DATABASE,
ItemType.USER_DATA_FUNCTION, ItemType.DIGITAL_TWIN_BUILDER, ItemType.GRAPH_QUERY_SET,
])
]

item_type_paramerter = pytest.mark.parametrize("item_type", ALL_ITEM_TYPES)

basic_item_parametrize = pytest.mark.parametrize("item_type", [
ItemType.DATA_PIPELINE, ItemType.ENVIRONMENT, ItemType.EVENTSTREAM,
Expand All @@ -62,6 +64,18 @@
ItemType.USER_DATA_FUNCTION, ItemType.DIGITAL_TWIN_BUILDER, ItemType.GRAPH_QUERY_SET,
])

rm_item_without_force_cancel_operation_success_params = pytest.mark.parametrize("item_type", [
item_type for item_type in ALL_ITEM_TYPES if item_type != ItemType.REPORT
])

rm_unsupported_item_failure_params = pytest.mark.parametrize("unsupported_item_type", [
ItemType.DASHBOARD,
ItemType.DATAMART,
ItemType.MIRRORED_WAREHOUSE,
ItemType.PAGINATED_REPORT,
ItemType.SQL_ENDPOINT,
])

mv_item_to_item_success_params = pytest.mark.parametrize("item_type", [
ItemType.DATA_PIPELINE, ItemType.KQL_DASHBOARD, ItemType.KQL_QUERYSET,
ItemType.MIRRORED_DATABASE, ItemType.NOTEBOOK,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (None; 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": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName":
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
"My workspace", "description": "", "type": "Personal"}]}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -26,23 +26,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '323'
- '2771'
Content-Type:
- application/json; charset=utf-8
Date:
- Wed, 03 Sep 2025 06:56:14 GMT
- Thu, 05 Feb 2026 07:40:46 GMT
Pragma:
- no-cache
RequestId:
- 747536e7-b611-4bda-a2c8-e194b766dc60
- a2b9e1e5-51ac-42d3-b33c-89d2ce3e16a7
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand All @@ -60,12 +60,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (None; 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": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName":
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
"My workspace", "description": "", "type": "Personal"}]}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -75,23 +75,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '323'
- '2771'
Content-Type:
- application/json; charset=utf-8
Date:
- Wed, 03 Sep 2025 06:56:14 GMT
- Thu, 05 Feb 2026 07:40:47 GMT
Pragma:
- no-cache
RequestId:
- 8367dc8c-f2ac-473b-b75c-504851ef091d
- 4b4dbbf3-63d2-41ed-bc81-85099db3ea5d
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand All @@ -109,13 +109,13 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (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": "F16", "region": "West Europe", "state":
"mocked_fabriccli_capacity_name", "sku": "F16", "region": "Central US", "state":
"Active"}]}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -125,23 +125,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '456'
- '425'
Content-Type:
- application/json; charset=utf-8
Date:
- Wed, 03 Sep 2025 06:56:18 GMT
- Thu, 05 Feb 2026 07:40:51 GMT
Pragma:
- no-cache
RequestId:
- 52eaccd4-d69e-4c2d-9534-c7ac3b392333
- 86e576f8-c8ca-466e-88e7-1d9a86b8d385
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand All @@ -162,12 +162,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (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": "916933dd-72f5-4d84-84d3-3552275d7fbc", "displayName": "fabriccli_WorkspacePerTestclass_000001",
string: '{"id": "adb8fb8e-54a1-4e39-927a-c4d65c660745", "displayName": "fabriccli_WorkspacePerTestclass_000001",
"description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -181,21 +181,21 @@ interactions:
Content-Type:
- application/json; charset=utf-8
Date:
- Wed, 03 Sep 2025 06:56:25 GMT
- Thu, 05 Feb 2026 07:41:29 GMT
Location:
- https://api.fabric.microsoft.com/v1/workspaces/916933dd-72f5-4d84-84d3-3552275d7fbc
- https://api.fabric.microsoft.com/v1/workspaces/adb8fb8e-54a1-4e39-927a-c4d65c660745
Pragma:
- no-cache
RequestId:
- aaefd334-14a5-49a5-96f2-95e43178a9ab
- d712d4d2-62b7-4538-ad54-88afd3f4fac1
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand All @@ -213,13 +213,13 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (rm; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (rm; 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": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName":
"My workspace", "description": "", "type": "Personal"}, {"id": "916933dd-72f5-4d84-84d3-3552275d7fbc",
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
"My workspace", "description": "", "type": "Personal"}, {"id": "adb8fb8e-54a1-4e39-927a-c4d65c660745",
"displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created
by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}'
headers:
Expand All @@ -230,23 +230,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '358'
- '2803'
Content-Type:
- application/json; charset=utf-8
Date:
- Wed, 03 Sep 2025 07:04:21 GMT
- Thu, 05 Feb 2026 07:49:09 GMT
Pragma:
- no-cache
RequestId:
- dfb7a55a-7913-4d92-9c29-ed3a38215dde
- 476ed3fa-c770-4091-85b7-0001aca37a68
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand All @@ -264,14 +264,25 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (rm; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (rm; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces/916933dd-72f5-4d84-84d3-3552275d7fbc/items
uri: https://api.fabric.microsoft.com/v1/workspaces/adb8fb8e-54a1-4e39-927a-c4d65c660745/items
response:
body:
string: '{"value": [{"id": "35dcd9aa-d9dd-420d-b1d5-959a4b5510ee", "type": "Notebook",
"displayName": "fabcli000001", "description": "Created by fab", "workspaceId":
"916933dd-72f5-4d84-84d3-3552275d7fbc"}]}'
string: '{"value": [{"id": "3ae126fe-eac8-4a53-a751-2fa6d72e643a", "type": "SemanticModel",
"displayName": "fabcli000001_auto", "description": "", "workspaceId": "adb8fb8e-54a1-4e39-927a-c4d65c660745"},
{"id": "ea1fce42-491b-433f-8692-3d237d4acc11", "type": "SQLEndpoint", "displayName":
"StagingLakehouseForDataflows_20260205074746", "description": "", "workspaceId":
"adb8fb8e-54a1-4e39-927a-c4d65c660745"}, {"id": "0f48811d-f17e-4011-adf2-3967c717102e",
"type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260205074758",
"description": "", "workspaceId": "adb8fb8e-54a1-4e39-927a-c4d65c660745"},
{"id": "16ea9fac-9ed5-4675-a3aa-5268964d04cb", "type": "SQLEndpoint", "displayName":
"fabcli000001dtdm", "description": "", "workspaceId": "adb8fb8e-54a1-4e39-927a-c4d65c660745"},
{"id": "40f22982-bb05-4403-9ffc-a76e8a7e3051", "type": "Lakehouse", "displayName":
"StagingLakehouseForDataflows_20260205074746", "description": "", "workspaceId":
"adb8fb8e-54a1-4e39-927a-c4d65c660745"}, {"id": "52276d4b-247c-4865-852b-e93a0b4339da",
"type": "Lakehouse", "displayName": "fabcli000001dtdm", "description": "",
"workspaceId": "adb8fb8e-54a1-4e39-927a-c4d65c660745"}]}'
headers:
Access-Control-Expose-Headers:
- RequestId
Expand All @@ -280,23 +291,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '175'
- '399'
Content-Type:
- application/json; charset=utf-8
Date:
- Wed, 03 Sep 2025 07:04:22 GMT
- Thu, 05 Feb 2026 07:49:10 GMT
Pragma:
- no-cache
RequestId:
- 3c2ccb50-3b47-421d-bcdf-af9fff1dc5a7
- 79effd17-3853-4a7d-b2a8-d032a79a77f2
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand All @@ -316,9 +327,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (rm; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (rm; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: DELETE
uri: https://api.fabric.microsoft.com/v1/workspaces/916933dd-72f5-4d84-84d3-3552275d7fbc
uri: https://api.fabric.microsoft.com/v1/workspaces/adb8fb8e-54a1-4e39-927a-c4d65c660745
response:
body:
string: ''
Expand All @@ -334,19 +345,19 @@ interactions:
Content-Type:
- application/octet-stream
Date:
- Wed, 03 Sep 2025 07:04:22 GMT
- Thu, 05 Feb 2026 07:49:11 GMT
Pragma:
- no-cache
RequestId:
- 5bda3a63-9a93-42a9-8873-93f88c09f3d9
- 322412fe-23c2-4f57-b6f6-f97bbffe45ae
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand Down
Loading