Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 19 additions & 0 deletions tests/test_commands/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,25 @@
)
from tests.test_commands.utils import cli_path_join, set_vcr_mode_env

custom_parametrize = pytest.mark.parametrize("item_type", [
ItemType.DATA_PIPELINE,
ItemType.ENVIRONMENT, ItemType.EVENTHOUSE, ItemType.EVENTSTREAM,
ItemType.KQL_DASHBOARD, ItemType.KQL_QUERYSET,
ItemType.LAKEHOUSE, ItemType.ML_EXPERIMENT, ItemType.ML_MODEL,
ItemType.MIRRORED_DATABASE, ItemType.NOTEBOOK,
ItemType.REFLEX, ItemType.REPORT,
ItemType.SQL_DATABASE, ItemType.SEMANTIC_MODEL,
ItemType.SPARK_JOB_DEFINITION, ItemType.WAREHOUSE, ItemType.COPYJOB,
ItemType.GRAPHQLAPI, ItemType.DATAFLOW,
])

basic_item_parametrize = pytest.mark.parametrize("item_type", [
ItemType.DATA_PIPELINE, ItemType.ENVIRONMENT, ItemType.EVENTSTREAM,
ItemType.KQL_DASHBOARD, ItemType.KQL_QUERYSET, ItemType.ML_EXPERIMENT,
ItemType.ML_MODEL, ItemType.MIRRORED_DATABASE, ItemType.NOTEBOOK,
ItemType.REFLEX, ItemType.SPARK_JOB_DEFINITION,
])

FILTER_HEADERS = [
"authorization",
"client-request-id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (assign; 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":
"My workspace", "description": "", "type": "Personal"}]}'
string: '{"value": []}'
headers:
Access-Control-Expose-Headers:
- RequestId
Expand All @@ -26,23 +25,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '323'
- '6379'
Content-Type:
- application/json; charset=utf-8
Date:
- Tue, 02 Sep 2025 18:40:40 GMT
- Tue, 20 Jan 2026 08:38:03 GMT
Pragma:
- no-cache
RequestId:
- 2cd94690-3067-4b0f-9a1a-a49ada3ef933
- 81047b0c-fd79-494b-9b0c-cb7fbd368165
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,13 +59,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (assign; 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":
"My workspace", "description": "", "type": "Personal"}]}'
string: '{"value": []}'
headers:
Access-Control-Expose-Headers:
- RequestId
Expand All @@ -75,23 +73,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '323'
- '6379'
Content-Type:
- application/json; charset=utf-8
Date:
- Tue, 02 Sep 2025 18:40:40 GMT
- Tue, 20 Jan 2026 08:38:04 GMT
Pragma:
- no-cache
RequestId:
- a3d93e9e-e7fb-4737-bc42-3be026f3360a
- 6cf851df-17ce-48cf-8748-3f4d1637962b
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,14 +107,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (assign; 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":
"Active"}]}'
string: '{"value": []}'
headers:
Access-Control-Expose-Headers:
- RequestId
Expand All @@ -125,31 +121,31 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '456'
- '272'
Content-Type:
- application/json; charset=utf-8
Date:
- Tue, 02 Sep 2025 18:40:43 GMT
- Tue, 20 Jan 2026 08:38:10 GMT
Pragma:
- no-cache
RequestId:
- 43ddb46e-c22c-4bf8-b33f-40559a3afb75
- aa67a641-5c72-4697-9f13-acb1e1580513
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:
code: 200
message: OK
- request:
body: '{"description": "Created by fab", "displayName": "fabriccli_WorkspacePerTestclass_000001",
"capacityId": "00000000-0000-0000-0000-000000000004"}'
"capacityId": "07b1fd56-9969-4ff5-a2c8-05df5f82759a"}'
headers:
Accept:
- '*/*'
Expand All @@ -162,13 +158,13 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (assign; 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": "49ab4e5d-367c-4f8b-a7a5-275cc77e5ec2", "displayName": "fabriccli_WorkspacePerTestclass_000001",
"description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}'
string: '{"id": "a427670c-4914-4767-a838-3c29aa028e24", "displayName": "fabriccli_WorkspacePerTestclass_000001",
"description": "Created by fab", "type": "Workspace", "capacityId": "07b1fd56-9969-4ff5-a2c8-05df5f82759a"}'
headers:
Access-Control-Expose-Headers:
- RequestId,Location
Expand All @@ -177,25 +173,25 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '187'
- '186'
Content-Type:
- application/json; charset=utf-8
Date:
- Tue, 02 Sep 2025 18:40:49 GMT
- Tue, 20 Jan 2026 08:38:18 GMT
Location:
- https://api.fabric.microsoft.com/v1/workspaces/49ab4e5d-367c-4f8b-a7a5-275cc77e5ec2
- https://api.fabric.microsoft.com/v1/workspaces/a427670c-4914-4767-a838-3c29aa028e24
Pragma:
- no-cache
RequestId:
- c5885377-c141-4c89-9f34-b4c8585d4dbe
- 927de369-7512-4b22-bd7d-11d47254b5d7
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,15 +209,14 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (assign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (assign; 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": "49ab4e5d-367c-4f8b-a7a5-275cc77e5ec2",
"displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created
by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}'
string: '{"value": [{"id": "a427670c-4914-4767-a838-3c29aa028e24", "displayName":
"fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab",
"type": "Workspace", "capacityId": "07b1fd56-9969-4ff5-a2c8-05df5f82759a"}]}'
headers:
Access-Control-Expose-Headers:
- RequestId
Expand All @@ -230,23 +225,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '357'
- '6410'
Content-Type:
- application/json; charset=utf-8
Date:
- Tue, 02 Sep 2025 18:41:24 GMT
- Tue, 20 Jan 2026 08:38:49 GMT
Pragma:
- no-cache
RequestId:
- acff0e22-138d-4f93-9bd9-c4fcbfa6a2bc
- 87863139-367a-4924-8c15-0c3345d1f4e0
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,9 +259,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (assign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (assign; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces/49ab4e5d-367c-4f8b-a7a5-275cc77e5ec2/items
uri: https://api.fabric.microsoft.com/v1/workspaces/a427670c-4914-4767-a838-3c29aa028e24/items
response:
body:
string: '{"value": []}'
Expand All @@ -282,19 +277,19 @@ interactions:
Content-Type:
- application/json; charset=utf-8
Date:
- Tue, 02 Sep 2025 18:41:23 GMT
- Tue, 20 Jan 2026 08:38:50 GMT
Pragma:
- no-cache
RequestId:
- 81fae1df-9255-401c-95e9-abfaf6e5616a
- cb63672b-c87d-4ec0-b6f0-8d2f0cf8e65b
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 @@ -314,9 +309,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (assign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (assign; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: DELETE
uri: https://api.fabric.microsoft.com/v1/workspaces/49ab4e5d-367c-4f8b-a7a5-275cc77e5ec2
uri: https://api.fabric.microsoft.com/v1/workspaces/a427670c-4914-4767-a838-3c29aa028e24
response:
body:
string: ''
Expand All @@ -332,19 +327,19 @@ interactions:
Content-Type:
- application/octet-stream
Date:
- Tue, 02 Sep 2025 18:41:23 GMT
- Tue, 20 Jan 2026 08:38:51 GMT
Pragma:
- no-cache
RequestId:
- c067f12e-7ade-4072-9a82-79da88d70429
- 83457f97-ae44-4407-ae8d-ebb033a5a879
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
Loading