diff --git a/tests/test_commands/recordings/test_commands/test_assign/class_setup.yaml b/tests/test_commands/recordings/test_commands/test_assign/class_setup.yaml index b53493f2..41e0d246 100644 --- a/tests/test_commands/recordings/test_commands/test_assign/class_setup.yaml +++ b/tests/test_commands/recordings/test_commands/test_assign/class_setup.yaml @@ -11,12 +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": + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": "My workspace", "description": "", "type": "Personal"}]}' headers: Access-Control-Expose-Headers: @@ -26,15 +26,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '323' + - '2271' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:40:40 GMT + - Wed, 28 Jan 2026 11:10:19 GMT Pragma: - no-cache RequestId: - - 2cd94690-3067-4b0f-9a1a-a49ada3ef933 + - 565bd365-2a90-4833-9b21-4c2ad41a7c28 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -42,7 +42,7 @@ interactions: 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: @@ -60,12 +60,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": + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": "My workspace", "description": "", "type": "Personal"}]}' headers: Access-Control-Expose-Headers: @@ -75,15 +75,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '323' + - '2271' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:40:40 GMT + - Wed, 28 Jan 2026 11:10:20 GMT Pragma: - no-cache RequestId: - - a3d93e9e-e7fb-4737-bc42-3be026f3360a + - 6cb7cbfa-4849-435f-9360-db9b046446b6 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -91,7 +91,7 @@ interactions: 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: @@ -109,13 +109,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: 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": "F32", "region": "Central US", "state": "Active"}]}' headers: Access-Control-Expose-Headers: @@ -125,15 +125,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '456' + - '424' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:40:43 GMT + - Wed, 28 Jan 2026 11:10:26 GMT Pragma: - no-cache RequestId: - - 43ddb46e-c22c-4bf8-b33f-40559a3afb75 + - b7b2578d-b453-4df6-a867-1c024c83cb6d Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -141,7 +141,7 @@ interactions: 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: @@ -162,12 +162,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: POST uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"id": "49ab4e5d-367c-4f8b-a7a5-275cc77e5ec2", "displayName": "fabriccli_WorkspacePerTestclass_000001", + string: '{"id": "524ce98f-875d-4eac-bac2-b11f01525859", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}' headers: Access-Control-Expose-Headers: @@ -177,17 +177,17 @@ interactions: Content-Encoding: - gzip Content-Length: - - '187' + - '189' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:40:49 GMT + - Wed, 28 Jan 2026 11:10:33 GMT Location: - - https://api.fabric.microsoft.com/v1/workspaces/49ab4e5d-367c-4f8b-a7a5-275cc77e5ec2 + - https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859 Pragma: - no-cache RequestId: - - c5885377-c141-4c89-9f34-b4c8585d4dbe + - ae261f5f-331f-49af-8ccd-fde9c862aced Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -195,7 +195,7 @@ interactions: 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: @@ -213,13 +213,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 (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", + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "524ce98f-875d-4eac-bac2-b11f01525859", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' headers: @@ -230,15 +230,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '357' + - '2303' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:24 GMT + - Wed, 28 Jan 2026 11:11:02 GMT Pragma: - no-cache RequestId: - - acff0e22-138d-4f93-9bd9-c4fcbfa6a2bc + - fa6822ae-b907-4a99-b378-8680ae149b44 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -246,7 +246,7 @@ interactions: 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: @@ -264,9 +264,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/524ce98f-875d-4eac-bac2-b11f01525859/items response: body: string: '{"value": []}' @@ -282,11 +282,11 @@ interactions: Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:23 GMT + - Wed, 28 Jan 2026 11:11:03 GMT Pragma: - no-cache RequestId: - - 81fae1df-9255-401c-95e9-abfaf6e5616a + - 03af16af-96ec-48a0-8993-78e0a3f1e477 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -294,7 +294,7 @@ interactions: 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: @@ -314,9 +314,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/524ce98f-875d-4eac-bac2-b11f01525859 response: body: string: '' @@ -332,11 +332,11 @@ interactions: Content-Type: - application/octet-stream Date: - - Tue, 02 Sep 2025 18:41:23 GMT + - Wed, 28 Jan 2026 11:11:04 GMT Pragma: - no-cache RequestId: - - c067f12e-7ade-4072-9a82-79da88d70429 + - 311b66df-193c-42eb-857a-7a00c888a2b8 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -344,7 +344,7 @@ interactions: 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: diff --git a/tests/test_commands/recordings/test_commands/test_assign/test_assign_domain_workspace_success.yaml b/tests/test_commands/recordings/test_commands/test_assign/test_assign_domain_workspace_success.yaml index fabac935..f323e39d 100644 --- a/tests/test_commands/recordings/test_commands/test_assign/test_assign_domain_workspace_success.yaml +++ b/tests/test_commands/recordings/test_commands/test_assign/test_assign_domain_workspace_success.yaml @@ -11,15 +11,13 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 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": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}]}' headers: Access-Control-Expose-Headers: - RequestId @@ -28,15 +26,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '357' + - '2271' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:00 GMT + - Wed, 28 Jan 2026 11:09:31 GMT Pragma: - no-cache RequestId: - - a83a98c4-3cec-4613-b92e-222a951b4cdb + - b85aade4-aa62-429e-8c6c-d67a6cb7e3a9 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -44,7 +42,7 @@ interactions: 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: @@ -62,15 +60,13 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 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": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}]}' headers: Access-Control-Expose-Headers: - RequestId @@ -79,15 +75,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '357' + - '2271' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:01 GMT + - Wed, 28 Jan 2026 11:09:32 GMT Pragma: - no-cache RequestId: - - 626de6d3-8f98-4239-898d-83a0621d1f0e + - 62af5e45-c70d-468d-a70b-0b41c6999439 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -95,7 +91,7 @@ interactions: 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: @@ -113,13 +109,13 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 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": "F32", "region": "Central US", "state": "Active"}]}' headers: Access-Control-Expose-Headers: @@ -129,15 +125,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '456' + - '424' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:08 GMT + - Wed, 28 Jan 2026 11:09:37 GMT Pragma: - no-cache RequestId: - - 3f3884df-3f7d-4bea-bf8b-df0cb86c07d6 + - ae6d487c-322a-4771-b6ef-36eb158e0048 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -145,7 +141,7 @@ interactions: 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: @@ -166,12 +162,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 method: POST uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"id": "695c69a8-32f7-4bee-9635-86e62551367b", "displayName": "fabcli000001", + string: '{"id": "518757b5-c55e-4a24-8350-ec6a2c5f4277", "displayName": "fabcli000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}' headers: Access-Control-Expose-Headers: @@ -181,17 +177,17 @@ interactions: Content-Encoding: - gzip Content-Length: - - '165' + - '166' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:16 GMT + - Wed, 28 Jan 2026 11:09:46 GMT Location: - - https://api.fabric.microsoft.com/v1/workspaces/695c69a8-32f7-4bee-9635-86e62551367b + - https://api.fabric.microsoft.com/v1/workspaces/518757b5-c55e-4a24-8350-ec6a2c5f4277 Pragma: - no-cache RequestId: - - 39edb18e-4400-4164-ae3d-b651429c542f + - 87fe66f9-95ea-4a1a-b22c-27d748a48f33 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -199,7 +195,7 @@ interactions: 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: @@ -217,7 +213,7 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 method: GET uri: https://api.fabric.microsoft.com/v1/admin/domains response: @@ -231,15 +227,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '825' + - '185' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:16 GMT + - Wed, 28 Jan 2026 11:09:46 GMT Pragma: - no-cache RequestId: - - 55e49faa-2a54-48d8-82f0-098de7cd3386 + - 92d92119-334e-4386-a51e-3a78c26aa490 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -247,7 +243,7 @@ interactions: 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: @@ -267,12 +263,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 method: POST uri: https://api.fabric.microsoft.com/v1/admin/domains response: body: - string: '{"contributorsScope": "AllTenant", "id": "e8cfe17b-4750-4487-9f23-5f2e2088f3af", + string: '{"contributorsScope": "AllTenant", "id": "be900866-e4f2-4ea5-9fe0-5f325add9f71", "displayName": "fabcli000002", "description": ""}' headers: Access-Control-Expose-Headers: @@ -286,13 +282,13 @@ interactions: Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:17 GMT + - Wed, 28 Jan 2026 11:09:48 GMT Location: - - https://api.fabric.microsoft.com/v1/admin/domains/e8cfe17b-4750-4487-9f23-5f2e2088f3af + - https://api.fabric.microsoft.com/v1/admin/domains/be900866-e4f2-4ea5-9fe0-5f325add9f71 Pragma: - no-cache RequestId: - - 6c8aed3b-4e0b-4c13-a827-97b524821917 + - 57acb9ea-8403-4c6e-baa7-21f78e666877 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -300,7 +296,7 @@ interactions: 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: @@ -318,12 +314,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 method: GET uri: https://api.fabric.microsoft.com/v1/admin/domains response: body: - string: '{"domains": [{"contributorsScope": "AllTenant", "id": "e8cfe17b-4750-4487-9f23-5f2e2088f3af", + string: '{"domains": [{"contributorsScope": "AllTenant", "id": "be900866-e4f2-4ea5-9fe0-5f325add9f71", "displayName": "fabcli000002", "description": ""}]}' headers: Access-Control-Expose-Headers: @@ -333,15 +329,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '861' + - '227' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:17 GMT + - Wed, 28 Jan 2026 11:09:48 GMT Pragma: - no-cache RequestId: - - 3d1fef25-c432-4dc4-a4b9-ec39eae03ff5 + - efa14740-56dc-436a-865a-d1c8fae5cd11 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -349,7 +345,7 @@ interactions: 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: @@ -367,17 +363,15 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 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"}, - {"id": "695c69a8-32f7-4bee-9635-86e62551367b", "displayName": "fabcli000001", - "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "518757b5-c55e-4a24-8350-ec6a2c5f4277", + "displayName": "fabcli000001", "description": "Created by fab", "type": "Workspace", + "capacityId": "00000000-0000-0000-0000-000000000004"}]}' headers: Access-Control-Expose-Headers: - RequestId @@ -386,15 +380,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '396' + - '2307' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:17 GMT + - Wed, 28 Jan 2026 11:09:49 GMT Pragma: - no-cache RequestId: - - f8c70822-1c4a-4d83-964b-4a54b887c707 + - 52380481-986c-478b-8b92-482bf335710f Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -402,14 +396,14 @@ interactions: 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: '{"workspacesIds": ["695c69a8-32f7-4bee-9635-86e62551367b"]}' + body: '{"workspacesIds": ["518757b5-c55e-4a24-8350-ec6a2c5f4277"]}' headers: Accept: - '*/*' @@ -422,9 +416,9 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 method: POST - uri: https://api.fabric.microsoft.com/v1/admin/domains/e8cfe17b-4750-4487-9f23-5f2e2088f3af/assignWorkspaces + uri: https://api.fabric.microsoft.com/v1/admin/domains/be900866-e4f2-4ea5-9fe0-5f325add9f71/assignWorkspaces response: body: string: '' @@ -440,11 +434,11 @@ interactions: Content-Type: - application/octet-stream Date: - - Tue, 02 Sep 2025 18:41:18 GMT + - Wed, 28 Jan 2026 11:09:51 GMT Pragma: - no-cache RequestId: - - 170588cd-3c9b-4ae2-afe8-080ed902e494 + - 0b4a6cc1-baa9-405c-98bc-9fb57196f8fe Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -452,7 +446,7 @@ interactions: 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: @@ -470,12 +464,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 method: GET uri: https://api.fabric.microsoft.com/v1/admin/domains response: body: - string: '{"domains": [{"contributorsScope": "AllTenant", "id": "e8cfe17b-4750-4487-9f23-5f2e2088f3af", + string: '{"domains": [{"contributorsScope": "AllTenant", "id": "be900866-e4f2-4ea5-9fe0-5f325add9f71", "displayName": "fabcli000002", "description": ""}]}' headers: Access-Control-Expose-Headers: @@ -485,15 +479,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '861' + - '227' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:17 GMT + - Wed, 28 Jan 2026 11:09:51 GMT Pragma: - no-cache RequestId: - - 27c2c2ba-5c63-4952-a60d-067d31229a56 + - b846c33c-2731-4ada-9e1c-40f965deb197 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -501,7 +495,7 @@ interactions: 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: @@ -519,12 +513,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 method: GET - uri: https://api.fabric.microsoft.com/v1/admin/domains/e8cfe17b-4750-4487-9f23-5f2e2088f3af + uri: https://api.fabric.microsoft.com/v1/admin/domains/be900866-e4f2-4ea5-9fe0-5f325add9f71 response: body: - string: '{"contributorsScope": "AllTenant", "id": "e8cfe17b-4750-4487-9f23-5f2e2088f3af", + string: '{"contributorsScope": "AllTenant", "id": "be900866-e4f2-4ea5-9fe0-5f325add9f71", "displayName": "fabcli000002", "description": ""}' headers: Access-Control-Expose-Headers: @@ -538,11 +532,11 @@ interactions: Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:18 GMT + - Wed, 28 Jan 2026 11:09:52 GMT Pragma: - no-cache RequestId: - - 08802dc0-23b2-44d4-b170-08687ab0aace + - 940663af-7ccd-427b-a176-292ae8a89f7e Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -550,7 +544,7 @@ interactions: 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: @@ -568,12 +562,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 method: GET - uri: https://api.fabric.microsoft.com/v1/admin/domains/e8cfe17b-4750-4487-9f23-5f2e2088f3af/workspaces + uri: https://api.fabric.microsoft.com/v1/admin/domains/be900866-e4f2-4ea5-9fe0-5f325add9f71/workspaces response: body: - string: '{"value": [{"id": "695c69a8-32f7-4bee-9635-86e62551367b", "displayName": + string: '{"value": [{"id": "518757b5-c55e-4a24-8350-ec6a2c5f4277", "displayName": "fabcli000001"}]}' headers: Access-Control-Expose-Headers: @@ -587,11 +581,11 @@ interactions: Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:17 GMT + - Wed, 28 Jan 2026 11:09:53 GMT Pragma: - no-cache RequestId: - - 96399cf2-1a25-41ce-87cd-c89ee200d771 + - 87a0eb26-52ab-44c9-ac03-46ffef94b3d8 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -599,7 +593,7 @@ interactions: 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: @@ -617,18 +611,13 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces + uri: https://api.fabric.microsoft.com/v1/admin/domains 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"}, - {"id": "695c69a8-32f7-4bee-9635-86e62551367b", "displayName": "fabcli000001", - "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004", - "domainId": "e8cfe17b-4750-4487-9f23-5f2e2088f3af"}]}' + string: '{"domains": [{"contributorsScope": "AllTenant", "id": "be900866-e4f2-4ea5-9fe0-5f325add9f71", + "displayName": "fabcli000002", "description": ""}]}' headers: Access-Control-Expose-Headers: - RequestId @@ -637,15 +626,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '427' + - '227' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:18 GMT + - Wed, 28 Jan 2026 11:09:53 GMT Pragma: - no-cache RequestId: - - 43dfdda7-827d-410c-ab8f-78b66bfdb105 + - 4a29a3ee-25f1-4eca-bbcc-0784104322ed Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -653,7 +642,7 @@ interactions: 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: @@ -668,15 +657,17 @@ interactions: - gzip, deflate Connection: - keep-alive + Content-Length: + - '0' Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 - method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/695c69a8-32f7-4bee-9635-86e62551367b/items + - ms-fabric-cli-test/1.3.1 + method: DELETE + uri: https://api.fabric.microsoft.com/v1/admin/domains/be900866-e4f2-4ea5-9fe0-5f325add9f71 response: body: - string: '{"value": []}' + string: '' headers: Access-Control-Expose-Headers: - RequestId @@ -685,15 +676,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '32' + - '0' Content-Type: - - application/json; charset=utf-8 + - application/octet-stream Date: - - Tue, 02 Sep 2025 18:41:18 GMT + - Wed, 28 Jan 2026 11:09:55 GMT Pragma: - no-cache RequestId: - - 08e8386d-785e-431c-878c-588ba5c898fa + - bfe2f792-43fa-4034-bd0a-586f2fc03dcf Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -701,7 +692,7 @@ interactions: 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: @@ -716,17 +707,18 @@ interactions: - gzip, deflate Connection: - keep-alive - Content-Length: - - '0' Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 - method: DELETE - uri: https://api.fabric.microsoft.com/v1/workspaces/695c69a8-32f7-4bee-9635-86e62551367b + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '' + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "518757b5-c55e-4a24-8350-ec6a2c5f4277", + "displayName": "fabcli000001", "description": "Created by fab", "type": "Workspace", + "capacityId": "00000000-0000-0000-0000-000000000004"}]}' headers: Access-Control-Expose-Headers: - RequestId @@ -735,15 +727,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '0' + - '2307' Content-Type: - - application/octet-stream + - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:18 GMT + - Wed, 28 Jan 2026 11:09:55 GMT Pragma: - no-cache RequestId: - - d54c23c9-653e-437a-a2bf-e3493df7e0d9 + - 038d48ac-8b3c-4819-a4e4-c5f4a66cae67 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -751,7 +743,7 @@ interactions: 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: @@ -769,13 +761,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 method: GET - uri: https://api.fabric.microsoft.com/v1/admin/domains + uri: https://api.fabric.microsoft.com/v1/workspaces/518757b5-c55e-4a24-8350-ec6a2c5f4277/items response: body: - string: '{"domains": [{"contributorsScope": "AllTenant", "id": "e8cfe17b-4750-4487-9f23-5f2e2088f3af", - "displayName": "fabcli000002", "description": ""}]}' + string: '{"value": []}' headers: Access-Control-Expose-Headers: - RequestId @@ -784,15 +775,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '861' + - '32' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:41:18 GMT + - Wed, 28 Jan 2026 11:09:57 GMT Pragma: - no-cache RequestId: - - 3200a397-ab15-4817-8076-8fdecd4f2086 + - a38cdd0d-3345-4eaa-8410-cb59316487b3 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -800,7 +791,7 @@ interactions: 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: @@ -820,9 +811,9 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.3.1 method: DELETE - uri: https://api.fabric.microsoft.com/v1/admin/domains/e8cfe17b-4750-4487-9f23-5f2e2088f3af + uri: https://api.fabric.microsoft.com/v1/workspaces/518757b5-c55e-4a24-8350-ec6a2c5f4277 response: body: string: '' @@ -838,11 +829,11 @@ interactions: Content-Type: - application/octet-stream Date: - - Tue, 02 Sep 2025 18:41:19 GMT + - Wed, 28 Jan 2026 11:09:57 GMT Pragma: - no-cache RequestId: - - 6b4e1aaf-9a17-4590-9f5f-5665d5ee8cb7 + - ace3a860-f9e4-4409-a66f-40faad035526 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -850,7 +841,7 @@ interactions: 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: diff --git a/tests/test_commands/recordings/test_commands/test_assign/test_assign_entity_item_not_supported_failure[.capacities-test_data-/.capacities/{}.Capacity].yaml b/tests/test_commands/recordings/test_commands/test_assign/test_assign_entity_item_not_supported_failure[.capacities-test_data-/.capacities/{}.Capacity].yaml new file mode 100644 index 00000000..4b738071 --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_assign/test_assign_entity_item_not_supported_failure[.capacities-test_data-/.capacities/{}.Capacity].yaml @@ -0,0 +1,506 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + 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": "524ce98f-875d-4eac-bac2-b11f01525859", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:34 GMT + Pragma: + - no-cache + RequestId: + - 0277e383-8ce3-413b-b33e-f7c21a908095 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859/items + response: + body: + string: '{"value": []}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '32' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:34 GMT + Pragma: + - no-cache + RequestId: + - 8340a785-7671-4ab3-a3b9-0bad196a71b2 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859/items + response: + body: + string: '{"value": []}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '32' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:36 GMT + Pragma: + - no-cache + RequestId: + - 86139853-416f-4a1c-aea5-9de903496da7 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - 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": "fabcli000001", "type": + "Lakehouse", "folderId": null}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859/lakehouses + response: + body: + string: '{"id": "1395edee-9bff-4763-ae4f-652b118d77d5", "type": "Lakehouse", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "524ce98f-875d-4eac-bac2-b11f01525859"}' + headers: + Access-Control-Expose-Headers: + - RequestId,ETag + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '166' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:40 GMT + ETag: + - '""' + Pragma: + - no-cache + RequestId: + - acbe5283-3418-49c4-973d-297785c08d38 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + 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": "F32", "region": "Central US", "state": + "Active"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '424' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:44 GMT + Pragma: + - no-cache + RequestId: + - 29c25f42-835c-4388-b85b-f61a7405b996 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + 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": "524ce98f-875d-4eac-bac2-b11f01525859", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:44 GMT + Pragma: + - no-cache + RequestId: + - 88ecc986-b19f-4905-92df-d0252c4d45b5 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859/items + response: + body: + string: '{"value": [{"id": "1395edee-9bff-4763-ae4f-652b118d77d5", "type": "Lakehouse", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "524ce98f-875d-4eac-bac2-b11f01525859"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '178' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:45 GMT + Pragma: + - no-cache + RequestId: + - 6786552e-25a4-4d43-8d71-c8b9d87d4954 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + 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": "524ce98f-875d-4eac-bac2-b11f01525859", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:46 GMT + Pragma: + - no-cache + RequestId: + - f58031bf-a3f6-4ec9-b7da-c03d0cf3fdf3 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859/items + response: + body: + string: '{"value": [{"id": "1395edee-9bff-4763-ae4f-652b118d77d5", "type": "Lakehouse", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "524ce98f-875d-4eac-bac2-b11f01525859"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '178' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:48 GMT + Pragma: + - no-cache + RequestId: + - c911dfaa-209c-4ef1-9556-a470ea1960aa + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: DELETE + uri: https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859/items/1395edee-9bff-4763-ae4f-652b118d77d5 + response: + body: + string: '' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '0' + Content-Type: + - application/octet-stream + Date: + - Wed, 28 Jan 2026 11:10:48 GMT + Pragma: + - no-cache + RequestId: + - 56f8627c-b390-4552-9097-2931ae278562 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/test_commands/recordings/test_commands/test_assign/test_assign_entity_item_not_supported_failure[.domains-virtual_workspace_item_factory-{}.full_path].yaml b/tests/test_commands/recordings/test_commands/test_assign/test_assign_entity_item_not_supported_failure[.domains-virtual_workspace_item_factory-{}.full_path].yaml new file mode 100644 index 00000000..5b45796f --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_assign/test_assign_entity_item_not_supported_failure[.domains-virtual_workspace_item_factory-{}.full_path].yaml @@ -0,0 +1,706 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + 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": "524ce98f-875d-4eac-bac2-b11f01525859", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:49 GMT + Pragma: + - no-cache + RequestId: + - 0cee7074-187a-476b-9d6c-3a2b6cc7a84a + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859/items + response: + body: + string: '{"value": []}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '32' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:50 GMT + Pragma: + - no-cache + RequestId: + - 16d61e56-76e7-4025-a5bf-f0efc601b9d8 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859/items + response: + body: + string: '{"value": []}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '32' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:51 GMT + Pragma: + - no-cache + RequestId: + - a9b844aa-328f-46e5-84f6-50d9b48a8d4f + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - 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": "fabcli000001", "type": + "Lakehouse", "folderId": null}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859/lakehouses + response: + body: + string: '{"id": "cfc1f725-f174-4043-99e7-fab26174c27a", "type": "Lakehouse", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "524ce98f-875d-4eac-bac2-b11f01525859"}' + headers: + Access-Control-Expose-Headers: + - RequestId,ETag + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '166' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:54 GMT + ETag: + - '""' + Pragma: + - no-cache + RequestId: + - 38968b88-6b6d-4f1e-aaf1-b25065259ed1 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/admin/domains + response: + body: + string: '{"domains": []}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '185' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:54 GMT + Pragma: + - no-cache + RequestId: + - 2e86bbd9-8fc7-442b-9a58-4b382e4d116f + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: '{"displayName": "fabcli000002"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/admin/domains + response: + body: + string: '{"contributorsScope": "AllTenant", "id": "0dbe5a48-eeb2-45a1-a619-7f8da446afe5", + "displayName": "fabcli000002", "description": ""}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '133' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:55 GMT + Location: + - https://api.fabric.microsoft.com/v1/admin/domains/0dbe5a48-eeb2-45a1-a619-7f8da446afe5 + Pragma: + - no-cache + RequestId: + - 80b18cc9-10df-4650-b2d8-ddf26be18d2f + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/admin/domains + response: + body: + string: '{"domains": [{"contributorsScope": "AllTenant", "id": "0dbe5a48-eeb2-45a1-a619-7f8da446afe5", + "displayName": "fabcli000002", "description": ""}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '227' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:56 GMT + Pragma: + - no-cache + RequestId: + - 99310032-58df-4948-b051-8de1dd7c40d7 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + 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": "524ce98f-875d-4eac-bac2-b11f01525859", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:57 GMT + Pragma: + - no-cache + RequestId: + - 5128d110-66f5-4833-a17a-9bf9b6685fa7 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859/items + response: + body: + string: '{"value": [{"id": "cfc1f725-f174-4043-99e7-fab26174c27a", "type": "Lakehouse", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "524ce98f-875d-4eac-bac2-b11f01525859"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '178' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:57 GMT + Pragma: + - no-cache + RequestId: + - 9027fa2b-a6c6-42d0-bf2d-89c2817de681 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/admin/domains + response: + body: + string: '{"domains": [{"contributorsScope": "AllTenant", "id": "0dbe5a48-eeb2-45a1-a619-7f8da446afe5", + "displayName": "fabcli000002", "description": ""}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '227' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:57 GMT + Pragma: + - no-cache + RequestId: + - 774bca6d-159a-4c07-becd-eaf4e5de4c80 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: DELETE + uri: https://api.fabric.microsoft.com/v1/admin/domains/0dbe5a48-eeb2-45a1-a619-7f8da446afe5 + response: + body: + string: '' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '0' + Content-Type: + - application/octet-stream + Date: + - Wed, 28 Jan 2026 11:10:59 GMT + Pragma: + - no-cache + RequestId: + - 7c436740-2f51-4eb1-adc0-75603e29fe11 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + 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": "524ce98f-875d-4eac-bac2-b11f01525859", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:10:59 GMT + Pragma: + - no-cache + RequestId: + - cefcbce8-8a3e-4281-bbd9-77deeac3742f + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859/items + response: + body: + string: '{"value": [{"id": "71745b0c-738c-42c0-b578-c7f25a6e63de", "type": "SQLEndpoint", + "displayName": "fabcli000001", "description": "", "workspaceId": "524ce98f-875d-4eac-bac2-b11f01525859"}, + {"id": "cfc1f725-f174-4043-99e7-fab26174c27a", "type": "Lakehouse", "displayName": + "fabcli000001", "description": "Created by fab", "workspaceId": "524ce98f-875d-4eac-bac2-b11f01525859"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '227' + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 28 Jan 2026 11:11:00 GMT + Pragma: + - no-cache + RequestId: + - f7770db0-4507-45de-8f68-cd278c23a641 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: DELETE + uri: https://api.fabric.microsoft.com/v1/workspaces/524ce98f-875d-4eac-bac2-b11f01525859/items/cfc1f725-f174-4043-99e7-fab26174c27a + response: + body: + string: '' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '0' + Content-Type: + - application/octet-stream + Date: + - Wed, 28 Jan 2026 11:11:02 GMT + Pragma: + - no-cache + RequestId: + - 26915a4d-20d9-49da-af01-168990e687b3 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/test_commands/test_assign.py b/tests/test_commands/test_assign.py index 13bcea91..9fff8151 100644 --- a/tests/test_commands/test_assign.py +++ b/tests/test_commands/test_assign.py @@ -4,6 +4,8 @@ import argparse from unittest.mock import patch +import pytest + import fabric_cli.commands.fs.fab_fs_unassign as fab_unassign from fabric_cli.commands.fs import fab_fs_get from fabric_cli.core import fab_constant as constant @@ -13,6 +15,65 @@ class TestAssign: + # region Parametrized Tests + def test_assign_domain_workspace_success( + self, + workspace_factory, + cli_executor, + mock_questionary_print, + virtual_workspace_item_factory, + ): + # Setup + workspace = workspace_factory() + domain = virtual_workspace_item_factory(VirtualWorkspaceType.DOMAIN) + mock_questionary_print.reset_mock() + + # Execute command + cli_executor.exec_command( + f"assign {domain.full_path} --workspace {workspace.full_path} --force" + ) + + # Assert + get(domain.full_path, query="domainWorkspaces") + assert any( + workspace.display_name in str(call.args[0]) + for call in mock_questionary_print.mock_calls + ) + + @pytest.mark.parametrize("entity_type,factory_key,path_template", [ + (VirtualWorkspaceType.CAPACITY, "test_data", "/.capacities/{}.Capacity"), + (VirtualWorkspaceType.DOMAIN, "virtual_workspace_item_factory", "{}.full_path"), + ]) + def test_assign_entity_item_not_supported_failure( + self, + entity_type, + factory_key, + path_template, + item_factory, + cli_executor, + assert_fabric_cli_error, + test_data: StaticTestData, + virtual_workspace_item_factory, + ): + # Setup + lakehouse = item_factory(ItemType.LAKEHOUSE) + + if factory_key == "test_data": + entity_path = path_template.format(test_data.capacity.name) + else: + domain = virtual_workspace_item_factory(entity_type) + entity_path = domain.full_path + + # Execute command + cli_executor.exec_command( + f"assign {entity_path} --workspace {lakehouse.full_path} --force" + ) + + # Assert + assert_fabric_cli_error(constant.ERROR_NOT_SUPPORTED) + + # endregion + # region ASSIGN def test_assign_capacity_workspace_success( self, @@ -122,70 +183,6 @@ def test_assign_capacity_workspace_without_force_cancel_operation_success( for call in mock_questionary_print.mock_calls ) - def test_assign_capacity_item_not_supported_failure( - self, - item_factory, - cli_executor, - assert_fabric_cli_error, - test_data: StaticTestData, - ): - # Setup - lakehouse = item_factory(ItemType.LAKEHOUSE) - capacity_full_path = f"/.capacities/{test_data.capacity.name}.Capacity" - - # Execute command - cli_executor.exec_command( - f"assign {capacity_full_path} --workspace {lakehouse.full_path} --force" - ) - - # Assert - assert_fabric_cli_error(constant.ERROR_NOT_SUPPORTED) - - def test_assign_domain_workspace_success( - self, - virtual_workspace_item_factory, - workspace_factory, - mock_questionary_print, - cli_executor, - ): - # Setup - workspace = workspace_factory() - domain = virtual_workspace_item_factory(VirtualWorkspaceType.DOMAIN) - - # Reset mock - mock_questionary_print.reset_mock() - - # Execute command - cli_executor.exec_command( - f"assign {domain.full_path} --workspace {workspace.full_path} --force" - ) - - # Assert - get(domain.full_path, query="domainWorkspaces") - assert any( - workspace.display_name in call.args[0] - for call in mock_questionary_print.mock_calls - ) - - def test_assign_domain_item_not_supported_failure( - self, - virtual_workspace_item_factory, - item_factory, - cli_executor, - assert_fabric_cli_error, - ): - # Setup - domain = virtual_workspace_item_factory(VirtualWorkspaceType.DOMAIN) - lakehouse = item_factory(ItemType.LAKEHOUSE) - - # Execute command - cli_executor.exec_command( - f"assign {domain.full_path} --workspace {lakehouse.full_path} --force" - ) - - # Assert - assert_fabric_cli_error(constant.ERROR_NOT_SUPPORTED) - # endregion