Skip to content
Open
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
22 changes: 21 additions & 1 deletion tests/test_commands/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
ItemType.REFLEX, ItemType.REPORT,
ItemType.SQL_DATABASE, ItemType.SEMANTIC_MODEL,
ItemType.SPARK_JOB_DEFINITION, ItemType.WAREHOUSE, ItemType.COPYJOB,
ItemType.GRAPHQLAPI, ItemType.DATAFLOW,
ItemType.GRAPHQLAPI, ItemType.DATAFLOW, ItemType.COSMOS_DB_DATABASE,
ItemType.USER_DATA_FUNCTION, ItemType.DIGITAL_TWIN_BUILDER, ItemType.GRAPH_QUERY_SET,
])

basic_item_parametrize = pytest.mark.parametrize("item_type", [
Expand Down Expand Up @@ -112,6 +113,25 @@
(ItemType.GRAPH_QUERY_SET, ".txt", "No formats are supported")
])

ONELAKE_FOLDER_PARAMS = [
(ItemType.LAKEHOUSE, "Files", True),
(ItemType.LAKEHOUSE, "Tables", True),
(ItemType.WAREHOUSE, "Files", False),
(ItemType.WAREHOUSE, "Tables", True),
(ItemType.SEMANTIC_MODEL, "Tables", False),
(ItemType.SPARK_JOB_DEFINITION, "Libs", True),
(ItemType.SPARK_JOB_DEFINITION, "Main", True),
(ItemType.KQL_DATABASE, "Tables", True),
(ItemType.SQL_DATABASE, "Tables", True),
(ItemType.SQL_DATABASE, "Files", True),
(ItemType.MIRRORED_DATABASE, "Tables", True),
(ItemType.MIRRORED_DATABASE, "Files", True),
]

exists_onelake_parameters = pytest.mark.parametrize(
"item_type,folder_name,created_by_default", ONELAKE_FOLDER_PARAMS
)

FILTER_HEADERS = [
"authorization",
"client-request-id",
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:
- Tue, 02 Sep 2025 19:29:50 GMT
- Fri, 06 Feb 2026 10:47:47 GMT
Pragma:
- no-cache
RequestId:
- 22cecd0a-38d0-4219-906b-90698f26a3e4
- 17440706-d289-4705-a6d8-b6ba3ac8197e
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:
- Tue, 02 Sep 2025 19:29:50 GMT
- Fri, 06 Feb 2026 10:47:48 GMT
Pragma:
- no-cache
RequestId:
- 842a3c53-1b0a-4ee2-bb50-d1e46106975a
- 1f794994-cdd0-43a3-8291-7a48909924c0
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'
- '424'
Content-Type:
- application/json; charset=utf-8
Date:
- Tue, 02 Sep 2025 19:29:54 GMT
- Fri, 06 Feb 2026 10:47:53 GMT
Pragma:
- no-cache
RequestId:
- 8d406935-6752-4d68-a951-5d68a964d873
- dc55b7de-c759-4194-8d2b-96470e14cc4f
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": "bd75f405-5a3e-4bd1-9a29-debc398aac7b", "displayName": "fabriccli_WorkspacePerTestclass_000001",
string: '{"id": "9f7ff46b-df20-4f1b-9b82-9183c6f6adc1", "displayName": "fabriccli_WorkspacePerTestclass_000001",
"description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -177,25 +177,25 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '186'
- '188'
Content-Type:
- application/json; charset=utf-8
Date:
- Tue, 02 Sep 2025 19:30:03 GMT
- Fri, 06 Feb 2026 10:48:02 GMT
Location:
- https://api.fabric.microsoft.com/v1/workspaces/bd75f405-5a3e-4bd1-9a29-debc398aac7b
- https://api.fabric.microsoft.com/v1/workspaces/9f7ff46b-df20-4f1b-9b82-9183c6f6adc1
Pragma:
- no-cache
RequestId:
- d0d878fb-5da7-4f20-8a4a-dfb7cac99eae
- aa65f6ab-0d41-4456-97de-ba22fe057dfe
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 (exists; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (exists; 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": "bd75f405-5a3e-4bd1-9a29-debc398aac7b",
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
"My workspace", "description": "", "type": "Personal"}, {"id": "9f7ff46b-df20-4f1b-9b82-9183c6f6adc1",
"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:
- '359'
- '2804'
Content-Type:
- application/json; charset=utf-8
Date:
- Tue, 02 Sep 2025 19:31:31 GMT
- Fri, 06 Feb 2026 10:56:35 GMT
Pragma:
- no-cache
RequestId:
- 9cf53ad3-b47c-44bc-a335-b5c8762f00c1
- 27b7cfd2-8247-4a9d-9f75-3004786f69d5
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,12 +264,20 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (exists; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (exists; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces/bd75f405-5a3e-4bd1-9a29-debc398aac7b/items
uri: https://api.fabric.microsoft.com/v1/workspaces/9f7ff46b-df20-4f1b-9b82-9183c6f6adc1/items
response:
body:
string: '{"value": []}'
string: '{"value": [{"id": "2f193862-af04-41f2-8e4c-4e7896ecdd18", "type": "Eventhouse",
"displayName": "fabcli000001_auto", "description": "Created by fab", "workspaceId":
"9f7ff46b-df20-4f1b-9b82-9183c6f6adc1"}, {"id": "0f6b72db-807f-4407-b222-ca230049dbe4",
"type": "KQLDatabase", "displayName": "fabcli000001_auto", "description":
"fabcli000001_auto", "workspaceId": "9f7ff46b-df20-4f1b-9b82-9183c6f6adc1"},
{"id": "7159e97b-fa51-4394-a71d-0b4ee9ae0090", "type": "Eventhouse", "displayName":
"fabcli000001_auto", "description": "Created by fab", "workspaceId": "9f7ff46b-df20-4f1b-9b82-9183c6f6adc1"},
{"id": "09a703d8-d3d1-4983-b483-0431246621d3", "type": "KQLDatabase", "displayName":
"fabcli000001_auto", "description": "fabcli000001_auto", "workspaceId": "9f7ff46b-df20-4f1b-9b82-9183c6f6adc1"}]}'
headers:
Access-Control-Expose-Headers:
- RequestId
Expand All @@ -278,23 +286,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '32'
- '301'
Content-Type:
- application/json; charset=utf-8
Date:
- Tue, 02 Sep 2025 19:31:31 GMT
- Fri, 06 Feb 2026 10:56:36 GMT
Pragma:
- no-cache
RequestId:
- c8f0fed1-89b4-4017-9f6f-b7fc0c5df959
- 07f37410-428d-4da8-a175-1699e443019d
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 +322,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.0.0 (exists; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (exists; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: DELETE
uri: https://api.fabric.microsoft.com/v1/workspaces/bd75f405-5a3e-4bd1-9a29-debc398aac7b
uri: https://api.fabric.microsoft.com/v1/workspaces/9f7ff46b-df20-4f1b-9b82-9183c6f6adc1
response:
body:
string: ''
Expand All @@ -332,19 +340,19 @@ interactions:
Content-Type:
- application/octet-stream
Date:
- Tue, 02 Sep 2025 19:31:32 GMT
- Fri, 06 Feb 2026 10:56:37 GMT
Pragma:
- no-cache
RequestId:
- dc6b91db-9143-43a1-b3c5-e9a390ecea5e
- 8e6c99db-97ed-42d2-ab4b-8797694bc332
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