diff --git a/tests/test_commands/recordings/test_commands/test_unassign/class_setup.yaml b/tests/test_commands/recordings/test_commands/test_unassign/class_setup.yaml index 7950303a..9687f9b3 100644 --- a/tests/test_commands/recordings/test_commands/test_unassign/class_setup.yaml +++ b/tests/test_commands/recordings/test_commands/test_unassign/class_setup.yaml @@ -11,12 +11,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.0.0 (unassign; 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: - - Wed, 03 Sep 2025 08:30:09 GMT + - Thu, 29 Jan 2026 10:27:28 GMT Pragma: - no-cache RequestId: - - 54479a5a-8e13-4a5c-bf9c-982bdba0c491 + - 4d826007-54a7-4dc2-af8f-ffe8425fa51e 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 (unassign; 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: - - Wed, 03 Sep 2025 08:30:09 GMT + - Thu, 29 Jan 2026 10:27:30 GMT Pragma: - no-cache RequestId: - - 4feefa45-e29e-4683-b6bc-0e5881814e49 + - 472469d7-715d-4c37-ab82-e4d503f80f8a 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 (unassign; 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: - - Wed, 03 Sep 2025 08:30:59 GMT + - Thu, 29 Jan 2026 10:27:33 GMT Pragma: - no-cache RequestId: - - 3ef4d07f-9a39-42d2-8408-edb4229075ae + - e5068d2c-eff8-45a5-a287-65068634f5c1 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 (unassign; 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": "04eab5b1-8c1c-4613-865a-94ef3e0d5727", "displayName": "fabriccli_WorkspacePerTestclass_000001", + string: '{"id": "823c0f6d-1c74-4cfb-a257-65316729b9b5", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}' headers: Access-Control-Expose-Headers: @@ -181,13 +181,13 @@ interactions: Content-Type: - application/json; charset=utf-8 Date: - - Wed, 03 Sep 2025 08:31:05 GMT + - Thu, 29 Jan 2026 10:27:42 GMT Location: - - https://api.fabric.microsoft.com/v1/workspaces/04eab5b1-8c1c-4613-865a-94ef3e0d5727 + - https://api.fabric.microsoft.com/v1/workspaces/823c0f6d-1c74-4cfb-a257-65316729b9b5 Pragma: - no-cache RequestId: - - 5225f890-f222-47cd-8818-e25effa0866a + - 539ddbb4-9715-4aa4-bcd6-2e61988f079c 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 (unassign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.3.1 (unassign; 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": "04eab5b1-8c1c-4613-865a-94ef3e0d5727", + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "823c0f6d-1c74-4cfb-a257-65316729b9b5", "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: - - '360' + - '2306' Content-Type: - application/json; charset=utf-8 Date: - - Wed, 03 Sep 2025 08:31:53 GMT + - Thu, 29 Jan 2026 10:28:15 GMT Pragma: - no-cache RequestId: - - 30d39d0d-8619-4f1c-b53a-1b6b2ab10896 + - 18215f24-7d53-44b0-98ff-137e154c05da 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 (unassign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.3.1 (unassign; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/04eab5b1-8c1c-4613-865a-94ef3e0d5727/items + uri: https://api.fabric.microsoft.com/v1/workspaces/823c0f6d-1c74-4cfb-a257-65316729b9b5/items response: body: string: '{"value": []}' @@ -282,11 +282,11 @@ interactions: Content-Type: - application/json; charset=utf-8 Date: - - Wed, 03 Sep 2025 08:31:53 GMT + - Thu, 29 Jan 2026 10:28:16 GMT Pragma: - no-cache RequestId: - - d05bc7e7-e528-4e13-bc4f-1a78037c4acc + - 4a23a346-6a3e-408a-8fc1-c88a23c49cfd 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 (unassign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.3.1 (unassign; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: DELETE - uri: https://api.fabric.microsoft.com/v1/workspaces/04eab5b1-8c1c-4613-865a-94ef3e0d5727 + uri: https://api.fabric.microsoft.com/v1/workspaces/823c0f6d-1c74-4cfb-a257-65316729b9b5 response: body: string: '' @@ -332,11 +332,11 @@ interactions: Content-Type: - application/octet-stream Date: - - Wed, 03 Sep 2025 08:31:53 GMT + - Thu, 29 Jan 2026 10:28:17 GMT Pragma: - no-cache RequestId: - - 04c16fd9-9d91-4f65-a068-13ad7de4d062 + - 7d5607c9-8605-40dc-a8d0-f8b83832fbda 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_unassign/test_unassign_entity_item_not_supported_failure[.capacities-test_data-/.capacities/{}.Capacity].yaml b/tests/test_commands/recordings/test_commands/test_unassign/test_unassign_entity_item_not_supported_failure[.capacities-test_data-/.capacities/{}.Capacity].yaml new file mode 100644 index 00000000..c9f4a1de --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_unassign/test_unassign_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": "823c0f6d-1c74-4cfb-a257-65316729b9b5", + "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: + - '2306' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:27:43 GMT + Pragma: + - no-cache + RequestId: + - 75695ac1-ba92-481c-b5de-71856bbc98f3 + 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/823c0f6d-1c74-4cfb-a257-65316729b9b5/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: + - Thu, 29 Jan 2026 10:27:44 GMT + Pragma: + - no-cache + RequestId: + - 36fa9dd8-34c0-4afc-b156-e46431be354e + 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/823c0f6d-1c74-4cfb-a257-65316729b9b5/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: + - Thu, 29 Jan 2026 10:27:45 GMT + Pragma: + - no-cache + RequestId: + - 8d21bb21-7993-48ec-82f1-5a4efcecc49e + 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/823c0f6d-1c74-4cfb-a257-65316729b9b5/lakehouses + response: + body: + string: '{"id": "83e56226-2e51-476e-be73-311b41417b0b", "type": "Lakehouse", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "823c0f6d-1c74-4cfb-a257-65316729b9b5"}' + headers: + Access-Control-Expose-Headers: + - RequestId,ETag + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '168' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:27:50 GMT + ETag: + - '""' + Pragma: + - no-cache + RequestId: + - 12b6360f-2334-4b28-8cc2-39be18b2cc95 + 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: + - Thu, 29 Jan 2026 10:27:56 GMT + Pragma: + - no-cache + RequestId: + - c13b76c8-c261-4fe6-b39c-10f27b43262c + 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": "823c0f6d-1c74-4cfb-a257-65316729b9b5", + "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: + - '2306' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:27:57 GMT + Pragma: + - no-cache + RequestId: + - d3583c9a-096a-4853-9b2b-557bb5085524 + 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/823c0f6d-1c74-4cfb-a257-65316729b9b5/items + response: + body: + string: '{"value": [{"id": "83e56226-2e51-476e-be73-311b41417b0b", "type": "Lakehouse", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "823c0f6d-1c74-4cfb-a257-65316729b9b5"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '179' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:27:58 GMT + Pragma: + - no-cache + RequestId: + - 67f1a603-c560-4f97-a0fc-63840f6c110c + 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": "823c0f6d-1c74-4cfb-a257-65316729b9b5", + "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: + - '2306' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:27:59 GMT + Pragma: + - no-cache + RequestId: + - fb21161e-6abc-446c-add2-9f0e7844d381 + 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/823c0f6d-1c74-4cfb-a257-65316729b9b5/items + response: + body: + string: '{"value": [{"id": "83e56226-2e51-476e-be73-311b41417b0b", "type": "Lakehouse", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "823c0f6d-1c74-4cfb-a257-65316729b9b5"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '179' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:00 GMT + Pragma: + - no-cache + RequestId: + - 5ddffb2e-8bc6-443b-bbca-e3dd463dafd2 + 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/823c0f6d-1c74-4cfb-a257-65316729b9b5/items/83e56226-2e51-476e-be73-311b41417b0b + 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: + - Thu, 29 Jan 2026 10:28:00 GMT + Pragma: + - no-cache + RequestId: + - 5c552bff-d4b8-497f-b27b-51146f82592b + 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_unassign/test_unassign_entity_item_not_supported_failure[.domains-virtual_workspace_item_factory-{}.full_path].yaml b/tests/test_commands/recordings/test_commands/test_unassign/test_unassign_entity_item_not_supported_failure[.domains-virtual_workspace_item_factory-{}.full_path].yaml new file mode 100644 index 00000000..75ef8561 --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_unassign/test_unassign_entity_item_not_supported_failure[.domains-virtual_workspace_item_factory-{}.full_path].yaml @@ -0,0 +1,705 @@ +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": "823c0f6d-1c74-4cfb-a257-65316729b9b5", + "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: + - '2306' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:01 GMT + Pragma: + - no-cache + RequestId: + - 4aa577cb-2502-4f1e-b51b-fd97728098e3 + 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/823c0f6d-1c74-4cfb-a257-65316729b9b5/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: + - Thu, 29 Jan 2026 10:28:02 GMT + Pragma: + - no-cache + RequestId: + - 39d11396-f260-4d1d-934a-38334f127e66 + 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/823c0f6d-1c74-4cfb-a257-65316729b9b5/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: + - Thu, 29 Jan 2026 10:28:04 GMT + Pragma: + - no-cache + RequestId: + - 3f76a0e3-dddb-4595-997b-99de1cb91545 + 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/823c0f6d-1c74-4cfb-a257-65316729b9b5/lakehouses + response: + body: + string: '{"id": "ad82f620-8f57-49ab-b183-0f2a59f42f22", "type": "Lakehouse", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "823c0f6d-1c74-4cfb-a257-65316729b9b5"}' + headers: + Access-Control-Expose-Headers: + - RequestId,ETag + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '168' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:07 GMT + ETag: + - '""' + Pragma: + - no-cache + RequestId: + - aeed4bac-2cae-4b46-9a3b-cb893e994bd4 + 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: + - Thu, 29 Jan 2026 10:28:08 GMT + Pragma: + - no-cache + RequestId: + - 43c2598b-c3fb-4a32-8c94-57cd61f300bf + 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": "bb146ef2-f436-469b-b816-7d3aaca93f9f", + "displayName": "fabcli000002", "description": ""}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '132' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:08 GMT + Location: + - https://api.fabric.microsoft.com/v1/admin/domains/bb146ef2-f436-469b-b816-7d3aaca93f9f + Pragma: + - no-cache + RequestId: + - 5664bc73-82ee-4b51-9c87-679167892500 + 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": "bb146ef2-f436-469b-b816-7d3aaca93f9f", + "displayName": "fabcli000002", "description": ""}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '226' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:09 GMT + Pragma: + - no-cache + RequestId: + - fa377194-0bf7-4dda-977d-8eb1235820e6 + 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": "823c0f6d-1c74-4cfb-a257-65316729b9b5", + "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: + - '2306' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:10 GMT + Pragma: + - no-cache + RequestId: + - 6f7af6b6-a2de-42fc-8042-778b7429ec27 + 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/823c0f6d-1c74-4cfb-a257-65316729b9b5/items + response: + body: + string: '{"value": [{"id": "ad82f620-8f57-49ab-b183-0f2a59f42f22", "type": "Lakehouse", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "823c0f6d-1c74-4cfb-a257-65316729b9b5"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '179' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:11 GMT + Pragma: + - no-cache + RequestId: + - b99a59ce-74d2-4e3b-b214-d0f8bf8bce59 + 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": "bb146ef2-f436-469b-b816-7d3aaca93f9f", + "displayName": "fabcli000002", "description": ""}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '226' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:11 GMT + Pragma: + - no-cache + RequestId: + - 05206571-0c39-4bd8-aadf-d4722cd6b21c + 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/bb146ef2-f436-469b-b816-7d3aaca93f9f + 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: + - Thu, 29 Jan 2026 10:28:13 GMT + Pragma: + - no-cache + RequestId: + - 59c5cc29-fab5-4183-890a-7e696506212d + 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": "823c0f6d-1c74-4cfb-a257-65316729b9b5", + "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: + - '2306' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:14 GMT + Pragma: + - no-cache + RequestId: + - c2785fd0-ef89-40b5-a8e2-25649119e694 + 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/823c0f6d-1c74-4cfb-a257-65316729b9b5/items + response: + body: + string: '{"value": [{"id": "ad82f620-8f57-49ab-b183-0f2a59f42f22", "type": "Lakehouse", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "823c0f6d-1c74-4cfb-a257-65316729b9b5"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '179' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:14 GMT + Pragma: + - no-cache + RequestId: + - ab033cba-3c0c-4f9f-a201-92e79c73b0ac + 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/823c0f6d-1c74-4cfb-a257-65316729b9b5/items/ad82f620-8f57-49ab-b183-0f2a59f42f22 + 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: + - Thu, 29 Jan 2026 10:28:15 GMT + Pragma: + - no-cache + RequestId: + - 176afab0-ba1f-4d06-ad30-aec112b36e36 + 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_unassign/test_unassign_entity_workspace_not_assigned_failure[.capacities-test_data-/.capacities/{}.Capacity].yaml b/tests/test_commands/recordings/test_commands/test_unassign/test_unassign_entity_workspace_not_assigned_failure[.capacities-test_data-/.capacities/{}.Capacity].yaml new file mode 100644 index 00000000..a3c5361f --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_unassign/test_unassign_entity_workspace_not_assigned_failure[.capacities-test_data-/.capacities/{}.Capacity].yaml @@ -0,0 +1,705 @@ +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"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2271' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:29 GMT + Pragma: + - no-cache + RequestId: + - 8eb9ac4c-52b6-44a0-9482-2580db60d427 + 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"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2271' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:30 GMT + Pragma: + - no-cache + RequestId: + - c7a9e133-344a-4e6c-962c-dd6876dcc1a5 + 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/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: + - '425' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:35 GMT + Pragma: + - no-cache + RequestId: + - a799c379-b9c6-4039-8051-ca085e4b2150 + 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", "capacityId": + "00000000-0000-0000-0000-000000000004"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '122' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"id": "a20808e6-b8f3-4c43-9ce2-bff70d4b4379", "displayName": "fabcli000001", + "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '167' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:43 GMT + Location: + - https://api.fabric.microsoft.com/v1/workspaces/a20808e6-b8f3-4c43-9ce2-bff70d4b4379 + Pragma: + - no-cache + RequestId: + - 90a7fd07-39ae-44a8-93a6-ecd213089dbf + 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: + - '425' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:50 GMT + Pragma: + - no-cache + RequestId: + - d5b89311-0931-49d3-9b6b-bdd4f8378cc2 + 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": "a20808e6-b8f3-4c43-9ce2-bff70d4b4379", + "displayName": "fabcli000001", "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: + - '2309' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:50 GMT + Pragma: + - no-cache + RequestId: + - 3741d832-0339-45e6-afe0-e8409b0032ab + 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/a20808e6-b8f3-4c43-9ce2-bff70d4b4379 + response: + body: + string: '{"id": "a20808e6-b8f3-4c43-9ce2-bff70d4b4379", "displayName": "fabcli000001", + "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004", + "capacityRegion": "Central US", "oneLakeEndpoints": {"blobEndpoint": "https://centralus-onelake.blob.fabric.microsoft.com", + "dfsEndpoint": "https://centralus-onelake.dfs.fabric.microsoft.com"}, "capacityAssignmentProgress": + "Completed"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '275' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:51 GMT + Pragma: + - no-cache + RequestId: + - eaa22b9b-d20e-4888-83e0-c0895407a3ef + 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: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/a20808e6-b8f3-4c43-9ce2-bff70d4b4379/unassignFromCapacity + 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: + - Thu, 29 Jan 2026 10:28:53 GMT + Pragma: + - no-cache + RequestId: + - 63e882e9-6e93-4877-8871-b0238b5c60fc + 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: 202 + message: Accepted +- 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: + - Thu, 29 Jan 2026 10:28:58 GMT + Pragma: + - no-cache + RequestId: + - a6ffe7b8-5d21-48be-bbec-58efba9f5280 + 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": "a20808e6-b8f3-4c43-9ce2-bff70d4b4379", + "displayName": "fabcli000001", "description": "Created by fab", "type": "Workspace"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2310' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:59 GMT + Pragma: + - no-cache + RequestId: + - 69c1e599-1d7f-4c99-a6bf-d4c2b5be37df + 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/a20808e6-b8f3-4c43-9ce2-bff70d4b4379 + response: + body: + string: '{"id": "a20808e6-b8f3-4c43-9ce2-bff70d4b4379", "displayName": "fabcli000001", + "description": "Created by fab", "type": "Workspace", "capacityAssignmentProgress": + "Completed"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '159' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:28:59 GMT + Pragma: + - no-cache + RequestId: + - 21f1f15f-0572-4c5c-aeda-ac8310ac197d + 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": "a20808e6-b8f3-4c43-9ce2-bff70d4b4379", + "displayName": "fabcli000001", "description": "Created by fab", "type": "Workspace"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2310' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:00 GMT + Pragma: + - no-cache + RequestId: + - 8ed7f4d0-9798-4cc8-94dd-16c543327209 + 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/a20808e6-b8f3-4c43-9ce2-bff70d4b4379/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: + - Thu, 29 Jan 2026 10:29:01 GMT + Pragma: + - no-cache + RequestId: + - be29a5a2-6c89-40ac-9d06-e604b3336de0 + 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/a20808e6-b8f3-4c43-9ce2-bff70d4b4379 + 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: + - Thu, 29 Jan 2026 10:29:02 GMT + Pragma: + - no-cache + RequestId: + - 8bc3cc48-51ed-4bf5-8456-e608e3a8d8a4 + 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_unassign/test_unassign_entity_workspace_not_assigned_failure[.domains-virtual_workspace_item_factory-{}.full_path].yaml b/tests/test_commands/recordings/test_commands/test_unassign/test_unassign_entity_workspace_not_assigned_failure[.domains-virtual_workspace_item_factory-{}.full_path].yaml new file mode 100644 index 00000000..a6e5dd6f --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_unassign/test_unassign_entity_workspace_not_assigned_failure[.domains-virtual_workspace_item_factory-{}.full_path].yaml @@ -0,0 +1,701 @@ +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"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2271' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:03 GMT + Pragma: + - no-cache + RequestId: + - 85697d0d-58a5-49cb-a04a-98aaa0e7188b + 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"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2271' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:04 GMT + Pragma: + - no-cache + RequestId: + - bf9e29a7-f540-4358-9fd6-5028b9ef445d + 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/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: + - '425' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:10 GMT + Pragma: + - no-cache + RequestId: + - 5f4b1b50-884a-44ff-a275-025f881abcf4 + 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", "capacityId": + "00000000-0000-0000-0000-000000000004"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '122' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"id": "a2a794f5-fcbd-4d03-8df2-9391efe82571", "displayName": "fabcli000001", + "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '166' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:19 GMT + Location: + - https://api.fabric.microsoft.com/v1/workspaces/a2a794f5-fcbd-4d03-8df2-9391efe82571 + Pragma: + - no-cache + RequestId: + - d57c2a74-50af-4207-b5c7-f4ef0e42c2d2 + 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: + - Thu, 29 Jan 2026 10:29:20 GMT + Pragma: + - no-cache + RequestId: + - f97bdfeb-d4bd-45ab-89ab-85bd40caa804 + 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": "6b5ff44e-2fa1-4fae-8892-bb979a452285", + "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: + - Thu, 29 Jan 2026 10:29:21 GMT + Location: + - https://api.fabric.microsoft.com/v1/admin/domains/6b5ff44e-2fa1-4fae-8892-bb979a452285 + Pragma: + - no-cache + RequestId: + - e53d0a51-9ada-4cf2-808f-e6812790bbb3 + 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": "6b5ff44e-2fa1-4fae-8892-bb979a452285", + "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: + - Thu, 29 Jan 2026 10:29:21 GMT + Pragma: + - no-cache + RequestId: + - 07c0ae42-a0fb-4cea-bec8-b0e4f2ad9430 + 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": "a2a794f5-fcbd-4d03-8df2-9391efe82571", + "displayName": "fabcli000001", "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: + - '2311' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:23 GMT + Pragma: + - no-cache + RequestId: + - 0e6527f5-d30b-4428-a78c-c034d20c9217 + 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/6b5ff44e-2fa1-4fae-8892-bb979a452285/workspaces + 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: + - Thu, 29 Jan 2026 10:29:23 GMT + Pragma: + - no-cache + RequestId: + - 1423cb0c-f4d7-475d-b774-11817417c208 + 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": "6b5ff44e-2fa1-4fae-8892-bb979a452285", + "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: + - Thu, 29 Jan 2026 10:29:23 GMT + Pragma: + - no-cache + RequestId: + - 725c2b24-f747-4c24-98b5-6483dec71a23 + 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/6b5ff44e-2fa1-4fae-8892-bb979a452285 + 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: + - Thu, 29 Jan 2026 10:29:24 GMT + Pragma: + - no-cache + RequestId: + - 4cb91e25-aebf-47e9-b740-08e4b5dffbdb + 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": "a2a794f5-fcbd-4d03-8df2-9391efe82571", + "displayName": "fabcli000001", "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: + - '2311' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:25 GMT + Pragma: + - no-cache + RequestId: + - d3cc443f-b39c-49f5-ab22-2a227fcbee03 + 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/a2a794f5-fcbd-4d03-8df2-9391efe82571/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: + - Thu, 29 Jan 2026 10:29:26 GMT + Pragma: + - no-cache + RequestId: + - 307b8805-4820-4f93-be4d-6f01c8350655 + 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/a2a794f5-fcbd-4d03-8df2-9391efe82571 + 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: + - Thu, 29 Jan 2026 10:29:27 GMT + Pragma: + - no-cache + RequestId: + - 2b1a04cf-69f2-4bd4-8adb-02b8cf14d1be + 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_unassign/test_unassign_entity_workspace_success[.capacities-test_data-/.capacities/{}.Capacity-id].yaml b/tests/test_commands/recordings/test_commands/test_unassign/test_unassign_entity_workspace_success[.capacities-test_data-/.capacities/{}.Capacity-id].yaml new file mode 100644 index 00000000..da52885f --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_unassign/test_unassign_entity_workspace_success[.capacities-test_data-/.capacities/{}.Capacity-id].yaml @@ -0,0 +1,802 @@ +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"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2271' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:29 GMT + Pragma: + - no-cache + RequestId: + - b1d5dfb0-d774-4eb4-b1d3-60453aaffce1 + 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"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2271' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:30 GMT + Pragma: + - no-cache + RequestId: + - b2556c47-d946-4c5e-bb5f-a0414aba5f92 + 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/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: + - '425' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:35 GMT + Pragma: + - no-cache + RequestId: + - 7efca30b-0fa3-49ee-a47b-b9cedb5b26f4 + 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", "capacityId": + "00000000-0000-0000-0000-000000000004"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '122' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"id": "a9f63e99-6e41-4ac2-9905-3822a373ddc0", "displayName": "fabcli000001", + "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '167' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:44 GMT + Location: + - https://api.fabric.microsoft.com/v1/workspaces/a9f63e99-6e41-4ac2-9905-3822a373ddc0 + Pragma: + - no-cache + RequestId: + - 6a9fbdf4-4cc6-4cc0-be95-5d99033d13fa + 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: + - '425' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:50 GMT + Pragma: + - no-cache + RequestId: + - 1db56439-c097-4332-ba9d-da911f0267f3 + 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": "a9f63e99-6e41-4ac2-9905-3822a373ddc0", + "displayName": "fabcli000001", "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: + - '2312' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:51 GMT + Pragma: + - no-cache + RequestId: + - a0405367-7111-4625-a4d0-c5793fb58a63 + 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/a9f63e99-6e41-4ac2-9905-3822a373ddc0 + response: + body: + string: '{"id": "a9f63e99-6e41-4ac2-9905-3822a373ddc0", "displayName": "fabcli000001", + "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004", + "capacityRegion": "Central US", "oneLakeEndpoints": {"blobEndpoint": "https://centralus-onelake.blob.fabric.microsoft.com", + "dfsEndpoint": "https://centralus-onelake.dfs.fabric.microsoft.com"}, "capacityAssignmentProgress": + "Completed"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '276' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:52 GMT + Pragma: + - no-cache + RequestId: + - fa122b8c-fc6a-4e21-813a-17203a2a0ff6 + 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: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/a9f63e99-6e41-4ac2-9905-3822a373ddc0/unassignFromCapacity + 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: + - Thu, 29 Jan 2026 10:29:54 GMT + Pragma: + - no-cache + RequestId: + - b9f97909-cc36-4dfe-a331-ac820fccd467 + 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: 202 + message: Accepted +- 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": "a9f63e99-6e41-4ac2-9905-3822a373ddc0", + "displayName": "fabcli000001", "description": "Created by fab", "type": "Workspace"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2314' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:55 GMT + Pragma: + - no-cache + RequestId: + - c58dd375-c5cb-4719-be6f-f61bbc1692df + 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/a9f63e99-6e41-4ac2-9905-3822a373ddc0 + response: + body: + string: '{"id": "a9f63e99-6e41-4ac2-9905-3822a373ddc0", "displayName": "fabcli000001", + "description": "Created by fab", "type": "Workspace", "capacityAssignmentProgress": + "Completed"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '159' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:56 GMT + Pragma: + - no-cache + RequestId: + - b25059db-76a4-4cd7-9b35-788133860481 + 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/a9f63e99-6e41-4ac2-9905-3822a373ddc0/managedPrivateEndpoints + response: + body: + string: '{"requestId": "26716624-ff41-4eed-910b-1f31c41b82ab", "errorCode": + "UnsupportedSku", "message": "Managed private endpoint is not supported for + this capacity sku."}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:56 GMT + Pragma: + - no-cache + RequestId: + - 26716624-ff41-4eed-910b-1f31c41b82ab + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Transfer-Encoding: + - chunked + 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' + x-ms-public-api-error-code: + - UnsupportedSku + status: + code: 400 + message: Bad Request +- 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/a9f63e99-6e41-4ac2-9905-3822a373ddc0/spark/settings + response: + body: + string: '{"requestId": "1586e989-fa1e-42d2-8f66-d6bc6986fc5b", "errorCode": + "WorkspaceHasNoCapacityAssigned", "message": "A workspace with a capacity + assigned is required for the operation"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Content-Length: + - '176' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:57 GMT + RequestId: + - 1586e989-fa1e-42d2-8f66-d6bc6986fc5b + 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' + x-ms-public-api-error-code: + - WorkspaceHasNoCapacityAssigned + status: + code: 400 + message: Bad Request +- 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/a9f63e99-6e41-4ac2-9905-3822a373ddc0/roleAssignments + response: + body: + string: '{"value": [{"id": "00000000-0000-0000-0000-000000000001", "principal": + {"id": "00000000-0000-0000-0000-000000000001", "displayName": "MSIT Cycle", + "type": "User", "userDetails": {"userPrincipalName": "mocked@admin_test_user"}}, + "role": "Admin"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '186' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:29:58 GMT + Pragma: + - no-cache + RequestId: + - b985ff54-bfa7-4a1d-a8a0-e644cf416bb0 + 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": "a9f63e99-6e41-4ac2-9905-3822a373ddc0", + "displayName": "fabcli000001", "description": "Created by fab", "type": "Workspace"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2314' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:30:00 GMT + Pragma: + - no-cache + RequestId: + - dc17cd8f-fd20-41f8-877f-1169f0a46bd2 + 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/a9f63e99-6e41-4ac2-9905-3822a373ddc0/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: + - Thu, 29 Jan 2026 10:30:01 GMT + Pragma: + - no-cache + RequestId: + - 9e69b7aa-69fd-44f0-a06c-6f284a1f6b80 + 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/a9f63e99-6e41-4ac2-9905-3822a373ddc0 + 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: + - Thu, 29 Jan 2026 10:30:02 GMT + Pragma: + - no-cache + RequestId: + - db20b7fa-2f62-4eb2-b1d0-2a7627e1574b + 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_unassign/test_unassign_entity_workspace_success[.domains-virtual_workspace_item_factory-{}.full_path-display_name].yaml b/tests/test_commands/recordings/test_commands/test_unassign/test_unassign_entity_workspace_success[.domains-virtual_workspace_item_factory-{}.full_path-display_name].yaml new file mode 100644 index 00000000..3a7ab303 --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_unassign/test_unassign_entity_workspace_success[.domains-virtual_workspace_item_factory-{}.full_path-display_name].yaml @@ -0,0 +1,1048 @@ +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"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2271' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:30:02 GMT + Pragma: + - no-cache + RequestId: + - 79ddc3d1-d060-46fe-a36d-ceab55021a81 + 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"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2271' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:30:04 GMT + Pragma: + - no-cache + RequestId: + - 86505a37-f8ed-45b6-a4a5-60897f9641c3 + 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/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: + - Thu, 29 Jan 2026 10:30:09 GMT + Pragma: + - no-cache + RequestId: + - a0babcd8-97d2-4365-924b-4332bbdd68fa + 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", "capacityId": + "00000000-0000-0000-0000-000000000004"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '122' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"id": "230188b8-54dc-4890-8fb9-ddfdbfef864b", "displayName": "fabcli000001", + "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '164' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:30:28 GMT + Location: + - https://api.fabric.microsoft.com/v1/workspaces/230188b8-54dc-4890-8fb9-ddfdbfef864b + Pragma: + - no-cache + RequestId: + - f9b0ec17-96c1-4253-bbe7-2c5af23c0b92 + 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: + - Thu, 29 Jan 2026 10:30:29 GMT + Pragma: + - no-cache + RequestId: + - 739e68ba-3f78-4110-a434-190d8d59d0d3 + 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": "b750fa29-33e1-47d0-87ad-90c6c5950019", + "displayName": "fabcli000002", "description": ""}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '134' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:30:29 GMT + Location: + - https://api.fabric.microsoft.com/v1/admin/domains/b750fa29-33e1-47d0-87ad-90c6c5950019 + Pragma: + - no-cache + RequestId: + - b1e14c6a-4cd2-45c6-b46d-71ca8feeaf6b + 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": "b750fa29-33e1-47d0-87ad-90c6c5950019", + "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: + - Thu, 29 Jan 2026 10:30:30 GMT + Pragma: + - no-cache + RequestId: + - a35ee68f-5835-4535-9eb3-75328c5b1198 + 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": "230188b8-54dc-4890-8fb9-ddfdbfef864b", + "displayName": "fabcli000001", "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: + - '2314' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:30:31 GMT + Pragma: + - no-cache + RequestId: + - 79036d1f-cae4-4eb8-b77f-5f44c1ec8c79 + 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: '{"workspacesIds": ["230188b8-54dc-4890-8fb9-ddfdbfef864b"]}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '59' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/admin/domains/b750fa29-33e1-47d0-87ad-90c6c5950019/assignWorkspaces + 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: + - Thu, 29 Jan 2026 10:30:32 GMT + Pragma: + - no-cache + RequestId: + - 1dce42c6-df20-40ee-9cec-1c759b563a0b + 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": "b750fa29-33e1-47d0-87ad-90c6c5950019", + "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: + - Thu, 29 Jan 2026 10:30:33 GMT + Pragma: + - no-cache + RequestId: + - fd3ab790-8bab-41cb-adcf-486e3ab0db52 + 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": "230188b8-54dc-4890-8fb9-ddfdbfef864b", + "displayName": "fabcli000001", "description": "Created by fab", "type": "Workspace", + "capacityId": "00000000-0000-0000-0000-000000000004", "domainId": "b750fa29-33e1-47d0-87ad-90c6c5950019"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2345' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:30:34 GMT + Pragma: + - no-cache + RequestId: + - 9550ac5d-292e-4445-a884-091512afbef0 + 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/b750fa29-33e1-47d0-87ad-90c6c5950019/workspaces + response: + body: + string: '{"value": [{"id": "230188b8-54dc-4890-8fb9-ddfdbfef864b", "displayName": + "fabcli000001"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '106' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:30:34 GMT + Pragma: + - no-cache + RequestId: + - aa46b9d7-da4a-49d3-9f85-3a60b26733de + 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: '{"workspacesIds": ["230188b8-54dc-4890-8fb9-ddfdbfef864b"]}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '59' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/admin/domains/b750fa29-33e1-47d0-87ad-90c6c5950019/unassignWorkspaces + 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: + - Thu, 29 Jan 2026 10:30:36 GMT + Pragma: + - no-cache + RequestId: + - 82a78651-c928-4578-ae97-d1a3e69b0266 + 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": "b750fa29-33e1-47d0-87ad-90c6c5950019", + "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: + - Thu, 29 Jan 2026 10:30:36 GMT + Pragma: + - no-cache + RequestId: + - f252b2c1-4628-4a47-91dc-897481e7a8dc + 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/b750fa29-33e1-47d0-87ad-90c6c5950019 + response: + body: + string: '{"contributorsScope": "AllTenant", "id": "b750fa29-33e1-47d0-87ad-90c6c5950019", + "displayName": "fabcli000002", "description": ""}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '134' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:30:36 GMT + Pragma: + - no-cache + RequestId: + - 28fc90f6-3427-4fd8-b764-10903fbd930f + 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/b750fa29-33e1-47d0-87ad-90c6c5950019/workspaces + 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: + - Thu, 29 Jan 2026 10:30:37 GMT + Pragma: + - no-cache + RequestId: + - 34837a01-38d3-4f7f-897c-0658b341caef + 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": "b750fa29-33e1-47d0-87ad-90c6c5950019", + "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: + - Thu, 29 Jan 2026 10:30:38 GMT + Pragma: + - no-cache + RequestId: + - cba15d7f-0eb4-4d7e-9b35-bfe223897aec + 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/b750fa29-33e1-47d0-87ad-90c6c5950019 + 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: + - Thu, 29 Jan 2026 10:30:39 GMT + Pragma: + - no-cache + RequestId: + - 579ad45f-8800-4395-9870-65eb50e48464 + 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": "230188b8-54dc-4890-8fb9-ddfdbfef864b", + "displayName": "fabcli000001", "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: + - '2314' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 10:30:40 GMT + Pragma: + - no-cache + RequestId: + - 924c1ed2-441b-4746-8675-c24b2e831070 + 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/230188b8-54dc-4890-8fb9-ddfdbfef864b/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: + - Thu, 29 Jan 2026 10:30:41 GMT + Pragma: + - no-cache + RequestId: + - 4de9fe9b-44e8-4f61-81e0-c8e7a9400c93 + 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/230188b8-54dc-4890-8fb9-ddfdbfef864b + 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: + - Thu, 29 Jan 2026 10:30:42 GMT + Pragma: + - no-cache + RequestId: + - 2953de00-6c3e-4ad8-9bd9-0a8dff827ea1 + 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_unassign.py b/tests/test_commands/test_unassign.py index 23deeafe..79c589ae 100644 --- a/tests/test_commands/test_unassign.py +++ b/tests/test_commands/test_unassign.py @@ -4,6 +4,8 @@ import argparse from unittest.mock import patch +import pytest + import fabric_cli.commands.fs.fab_fs_assign as fab_assign import fabric_cli.commands.fs.fab_fs_unassign as fab_unassign from fabric_cli.commands.fs import fab_fs_get @@ -14,6 +16,125 @@ class TestUnassign: + # region Parametrized Tests + @pytest.mark.parametrize("entity_type,factory_key,path_template,assertion_key", [ + (VirtualWorkspaceType.CAPACITY, "test_data", + "/.capacities/{}.Capacity", "id"), + (VirtualWorkspaceType.DOMAIN, "virtual_workspace_item_factory", + "{}.full_path", "display_name"), + ]) + def test_unassign_entity_workspace_success( + self, + entity_type, + factory_key, + path_template, + assertion_key, + workspace_factory, + cli_executor, + mock_questionary_print, + test_data: StaticTestData, + virtual_workspace_item_factory, + ): + # Setup + workspace = workspace_factory() + mock_questionary_print.reset_mock() + + if factory_key == "test_data": + # Capacity scenario + entity_path = path_template.format(test_data.capacity.name) + assertion_value = getattr(test_data.capacity, assertion_key) + else: + # Domain scenario + domain = virtual_workspace_item_factory(entity_type) + assign(domain.full_path, workspace.full_path) + entity_path = domain.full_path + assertion_value = getattr(domain, assertion_key) + + # Execute command + cli_executor.exec_command( + f"unassign {entity_path} --workspace {workspace.full_path} --force" + ) + + # Assert + if entity_type == VirtualWorkspaceType.CAPACITY: + get(workspace.full_path, query=".") + else: + get(entity_path, query="domainWorkspaces") + + assert any( + str(assertion_value) not 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_unassign_entity_workspace_not_assigned_failure( + self, + entity_type, + factory_key, + path_template, + workspace_factory, + cli_executor, + assert_fabric_cli_error, + test_data: StaticTestData, + virtual_workspace_item_factory, + ): + # Setup + workspace = workspace_factory() + + if factory_key == "test_data": + # Capacity scenario - ensure it's unassigned first + entity_path = path_template.format(test_data.capacity.name) + unassign(entity_path, workspace.full_path) + else: + # Domain scenario - just create domain without assigning + domain = virtual_workspace_item_factory(entity_type) + entity_path = domain.full_path + + # Execute command + cli_executor.exec_command( + f"unassign {entity_path} --workspace {workspace.full_path} --force" + ) + + # Assert + assert_fabric_cli_error(constant.ERROR_INVALID_INPUT) + + @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_unassign_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"unassign {entity_path} --workspace {lakehouse.full_path} --force" + ) + + # Assert + assert_fabric_cli_error(constant.ERROR_NOT_SUPPORTED) + + # endregion + # region CAPACITY TESTS def test_unassign_capacity_workspace_success( self, @@ -107,113 +228,6 @@ def test_unassign_capacity_workspace_without_force_cancel_operation_success( for call in mock_questionary_print.mock_calls ) - def test_unassign_capacity_workspace_not_assigned_failure( - self, - workspace_factory, - cli_executor, - assert_fabric_cli_error, - test_data: StaticTestData, - ): - # Setup - workspace = workspace_factory() - capacity_full_path = f"/.capacities/{test_data.capacity.name}.Capacity" - unassign(capacity_full_path, workspace.full_path) - - # Execute command - cli_executor.exec_command( - f"unassign {capacity_full_path} --workspace {workspace.full_path} --force" - ) - - # Assert - assert_fabric_cli_error(constant.ERROR_INVALID_INPUT) - - def test_unassign_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"unassign {capacity_full_path} --workspace {lakehouse.full_path} --force" - ) - - # Assert - assert_fabric_cli_error(constant.ERROR_NOT_SUPPORTED) - - # endregion - - # region DOMAIN TESTS - def test_unassign_domain_workspace_success( - self, - workspace_factory, - cli_executor, - virtual_workspace_item_factory, - mock_questionary_print, - ): - # Setup - workspace = workspace_factory() - domain = virtual_workspace_item_factory(VirtualWorkspaceType.DOMAIN) - assign(domain.full_path, workspace.full_path) - mock_questionary_print.reset_mock() - - # Execute command - cli_executor.exec_command( - f"unassign {domain.full_path} --workspace {workspace.full_path} --force" - ) - - # Assert - get(domain.full_path, query="domainWorkspaces") - assert any( - workspace.display_name not in call.args[0] - for call in mock_questionary_print.mock_calls - ) - - def test_unassign_domain_workspace_not_assigned_failure( - self, - workspace_factory, - cli_executor, - virtual_workspace_item_factory, - mock_questionary_print, - assert_fabric_cli_error, - ): - # Setup - workspace = workspace_factory() - domain = virtual_workspace_item_factory(VirtualWorkspaceType.DOMAIN) - mock_questionary_print.reset_mock() - - # Execute command - cli_executor.exec_command( - f"unassign {domain.full_path} --workspace {workspace.full_path} --force" - ) - - # Assert - assert_fabric_cli_error(constant.ERROR_INVALID_INPUT) - - def test_unassign_domain_item_not_supported_failure( - self, - item_factory, - cli_executor, - virtual_workspace_item_factory, - assert_fabric_cli_error, - ): - # Setup - lakehouse = item_factory(ItemType.LAKEHOUSE) - domain = virtual_workspace_item_factory(VirtualWorkspaceType.DOMAIN) - - # Execute command - cli_executor.exec_command( - f"unassign {domain.full_path} --workspace {lakehouse.full_path} --force" - ) - - # Assert - assert_fabric_cli_error(constant.ERROR_NOT_SUPPORTED) - # endregion