diff --git a/.changes/unreleased/added-sqldatabase-creationpayload.yaml b/.changes/unreleased/added-sqldatabase-creationpayload.yaml new file mode 100644 index 00000000..e26e9a91 --- /dev/null +++ b/.changes/unreleased/added-sqldatabase-creationpayload.yaml @@ -0,0 +1,6 @@ +kind: added +body: Add SQL Database creationPayload support for mkdir command with mode, backupRetentionDays, and collation parameters +time: 2026-03-13T00:00:00.000000000Z +custom: + Author: dzsquared + AuthorLink: https://github.com/dzsquared diff --git a/src/fabric_cli/errors/mkdir.py b/src/fabric_cli/errors/mkdir.py index 8d55e406..2d15ec63 100644 --- a/src/fabric_cli/errors/mkdir.py +++ b/src/fabric_cli/errors/mkdir.py @@ -19,3 +19,7 @@ def workspace_capacity_not_found() -> str: @staticmethod def folder_name_exists() -> str: return "A folder with the same name already exists" + + @staticmethod + def invalid_parameter_format(invalidParam: str, expectedFormat: str) -> str: + return f"Invalid parameter format: '{invalidParam}'. Expected format: {expectedFormat}" diff --git a/src/fabric_cli/utils/fab_cmd_mkdir_utils.py b/src/fabric_cli/utils/fab_cmd_mkdir_utils.py index e75ecd2e..491af3db 100644 --- a/src/fabric_cli/utils/fab_cmd_mkdir_utils.py +++ b/src/fabric_cli/utils/fab_cmd_mkdir_utils.py @@ -188,6 +188,29 @@ def add_type_specific_payload(item: Item, args, payload): ] } + case ItemType.SQL_DATABASE: + _mode = params.get("mode") + _backup_retention_days = params.get("backupretentiondays") + _collation = params.get("collation") + + if _mode or _backup_retention_days or _collation: + creation_payload: dict = {"creationMode": _mode if _mode else "new"} + if _backup_retention_days: + try: + creation_payload["backupRetentionDays"] = int( + _backup_retention_days + ) + except ValueError: + raise FabricCLIError( + ErrorMessages.Mkdir.invalid_parameter_format( + _backup_retention_days, "integer" + ), + fab_constant.ERROR_INVALID_INPUT, + ) + if _collation: + creation_payload["collation"] = _collation + payload_dict["creationPayload"] = creation_payload + return payload_dict @@ -309,6 +332,8 @@ def get_params_per_item_type(item: Item): optional_params = ["semanticModelId"] case ItemType.MOUNTED_DATA_FACTORY: required_params = ["subscriptionId", "resourceGroup", "factoryName"] + case ItemType.SQL_DATABASE: + optional_params = ["mode", "backupRetentionDays", "collation"] return required_params, optional_params diff --git a/tests/test_commands/conftest.py b/tests/test_commands/conftest.py index 114bc54c..4fbde0e1 100644 --- a/tests/test_commands/conftest.py +++ b/tests/test_commands/conftest.py @@ -83,6 +83,8 @@ ["Latin1_General_100_CI_AS_KS_WS_SC_UTF8"]), (ItemType.WAREHOUSE, "", ["Latin1_General_100_BIN2_UTF8"]), (ItemType.REPORT, "", ["_auto"]), + (ItemType.SQL_DATABASE, "backupRetentionDays=21,collation=SQL_Latin1_General_CP1_CS_AS", + ["backupRetentionDays", "collation"]), ]) mv_item_to_item_success_params = pytest.mark.parametrize("item_type", [ diff --git a/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_item_with_creation_payload_success[SQLDatabase-backupRetentionDays=21,collation=SQL_Latin1_General_CP1_CS_AS-expected_assertions4].yaml b/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_item_with_creation_payload_success[SQLDatabase-backupRetentionDays=21,collation=SQL_Latin1_General_CP1_CS_AS-expected_assertions4].yaml new file mode 100644 index 00000000..c8b9da22 --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_item_with_creation_payload_success[SQLDatabase-backupRetentionDays=21,collation=SQL_Latin1_General_CP1_CS_AS-expected_assertions4].yaml @@ -0,0 +1,834 @@ +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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:52 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002bc + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '366' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:53 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002bd + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '366' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:53 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002be + 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": "SQLDatabase", "folderId": null, "creationPayload": {"creationMode": "new", "backupRetentionDays": 21, "collation": "SQL_Latin1_General_CP1_CS_AS"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '221' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/sqlDatabases + response: + body: + string: 'null' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,ETag,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '24' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:55 GMT + ETag: + - '""' + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-7777-4000-8000-aaaaaaaaa007 + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002bf + Retry-After: + - '20' + 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-operation-id: + - a1b2c3d4-7777-4000-8000-aaaaaaaaa007 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-7777-4000-8000-aaaaaaaaa007 + response: + body: + string: '{"status": "Succeeded", "createdTimeUtc": "2026-01-29T08:45:54.7107629", "lastUpdatedTimeUtc": "2026-01-29T08:46:09.3926068", "percentComplete": 100, "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,x-ms-operation-id + 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 08:46:17 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-7777-4000-8000-aaaaaaaaa007/result + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002c0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a1b2c3d4-7777-4000-8000-aaaaaaaaa007 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-7777-4000-8000-aaaaaaaaa007/result + response: + body: + string: '{"id": "a1b2c3d4-7777-4000-8000-000000000007", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Thu, 29 Jan 2026 08:46:18 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002c1 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + 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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:19 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002c2 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a663b076-e4ce-4a22-a37a-f94b1937cd41", "type": "SQLEndpoint", "displayName": "fabcli000001", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a1b2c3d4-7777-4000-8000-000000000007", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '451' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:20 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002c3 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/sqlDatabases/a1b2c3d4-7777-4000-8000-000000000007 + response: + body: + string: '{"id": "a1b2c3d4-7777-4000-8000-000000000007", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "properties": {"connectionInfo": "Data Source=vwbb4lsqmqqejdvenqo7wshysy-m2op2dhqhnbu5asxjn3kvbsydy.database.fabric.microsoft.com,1433;Initial Catalog=fabcli000001-a1b2c3d4-7777-4000-8000-000000000007;Multiple Active Result Sets=False;Connect Timeout=30;Encrypt=True;Trust Server Certificate=False", "connectionString": "mock_connection_string", "databaseName": "fabcli000001-a1b2c3d4-7777-4000-8000-000000000007", "serverFqdn": "vwbb4lsqmqqejdvenqo7wshysy-m2op2dhqhnbu5asxjn3kvbsydy.database.fabric.microsoft.com,1433", "backupRetentionDays": 7, "collation": "SQL_Latin1_General_CP1_CI_AS"}}' + headers: + Access-Control-Expose-Headers: + - RequestId,ETag + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '438' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:21 GMT + ETag: + - '""' + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002c4 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items/a1b2c3d4-7777-4000-8000-000000000007/getDefinition + response: + body: + string: 'null' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '24' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:22 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-7777-4000-8000-bbbbbbbbb007 + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002c5 + Retry-After: + - '20' + 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-operation-id: + - a1b2c3d4-7777-4000-8000-bbbbbbbbb007 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-7777-4000-8000-bbbbbbbbb007 + response: + body: + string: '{"status": "Running", "createdTimeUtc": "2026-01-29T08:46:22.691334", "lastUpdatedTimeUtc": "2026-01-29T08:46:22.691334", "percentComplete": null, "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '121' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:44 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-7777-4000-8000-bbbbbbbbb007 + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002c6 + Retry-After: + - '20' + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a1b2c3d4-7777-4000-8000-bbbbbbbbb007 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-7777-4000-8000-bbbbbbbbb007 + response: + body: + string: '{"status": "Succeeded", "createdTimeUtc": "2026-01-29T08:46:22.691334", "lastUpdatedTimeUtc": "2026-01-29T08:46:51.5089905", "percentComplete": 100, "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,x-ms-operation-id + 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 08:47:06 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-7777-4000-8000-bbbbbbbbb007/result + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002c7 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a1b2c3d4-7777-4000-8000-bbbbbbbbb007 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-7777-4000-8000-bbbbbbbbb007/result + response: + body: + string: '{"definition": {"format": "dacpac", "parts": [{"path": "fabcli000001.dacpac", "payload": "UEsDBBQAAAAIANZFPV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+/z1ed56NWLxtQFNrArK1DEPjw6bgxMUhdHOFt9f0dKKlc5GWhF4gkx+ZYGl8oQiXNSh3FwkuXYYHT+6RrCfVUd0AcWYilk+QCrr1S7qRd1m7O9YfMc1GXrLSgDQrPgaqPVuOLtH1BLAQIUABQAAAAIANZFPVzG6qC/qQIAALwHAAAJAAAAAAAAAAAAAAAAAAAAAABtb2RlbC54bWxQSwECFAAUAAAACADWRT1chiT0mqUAAADIAAAADwAAAAAAAAAAAAAAAADQAgAARGFjTWV0YWRhdGEueG1sUEsBAhQAFAAAAAgA1kU9XImOzHwuAgAAXQQAAAoAAAAAAAAAAAAAAAAAogMAAE9yaWdpbi54bWxQSwECFAAUAAAACADWRT1c7aHT4I8AAACvAAAAEwAAAAAAAAAAAAAAAAD4BQAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLBQYAAAAABAAEAO0AAAC4BgAAAAA=", "payloadType": "InlineBase64"}, {"path": ".platform", "payload": "ewogICIkc2NoZW1hIjogImh0dHBzOi8vZGV2ZWxvcGVyLm1pY3Jvc29mdC5jb20vanNvbi1zY2hlbWFzL2ZhYnJpYy9naXRJbnRlZ3JhdGlvbi9wbGF0Zm9ybVByb3BlcnRpZXMvMi4wLjAvc2NoZW1hLmpzb24iLAogICJtZXRhZGF0YSI6IHsKICAgICJ0eXBlIjogIlNRTERhdGFiYXNlIiwKICAgICJkaXNwbGF5TmFtZSI6ICJmYWJjbGkwMDAwMDEiLAogICAgImRlc2NyaXB0aW9uIjogIkNyZWF0ZWQgYnkgZmFiIgogIH0sCiAgImNvbmZpZyI6IHsKICAgICJ2ZXJzaW9uIjogIjIuMCIsCiAgICAibG9naWNhbElkIjogIjAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwIgogIH0KfQ==", "payloadType": "InlineBase64"}]}}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Thu, 29 Jan 2026 08:47:07 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002c8 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items/a1b2c3d4-7777-4000-8000-000000000007/connections + 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 08:47:08 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002c9 + 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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:47:08 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002ca + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a663b076-e4ce-4a22-a37a-f94b1937cd41", "type": "SQLEndpoint", "displayName": "fabcli000001", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a1b2c3d4-7777-4000-8000-000000000007", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '451' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:47:09 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002cb + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items/a1b2c3d4-7777-4000-8000-000000000007 + 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 08:47:10 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-7777-4000-8000-0000000002cc + 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_mkdir/test_mkdir_sqldatabase_explicit_mode_success.yaml b/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_sqldatabase_explicit_mode_success.yaml new file mode 100644 index 00000000..3568cc1a --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_sqldatabase_explicit_mode_success.yaml @@ -0,0 +1,834 @@ +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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:52 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-000000000190 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '366' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:53 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-000000000191 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '366' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:53 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-000000000192 + 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": "SQLDatabase", "folderId": null, "creationPayload": {"creationMode": "new"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/sqlDatabases + response: + body: + string: 'null' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,ETag,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '24' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:55 GMT + ETag: + - '""' + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-4444-4000-8000-aaaaaaaaa004 + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-000000000193 + Retry-After: + - '20' + 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-operation-id: + - a1b2c3d4-4444-4000-8000-aaaaaaaaa004 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-4444-4000-8000-aaaaaaaaa004 + response: + body: + string: '{"status": "Succeeded", "createdTimeUtc": "2026-01-29T08:45:54.7107629", "lastUpdatedTimeUtc": "2026-01-29T08:46:09.3926068", "percentComplete": 100, "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,x-ms-operation-id + 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 08:46:17 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-4444-4000-8000-aaaaaaaaa004/result + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-000000000194 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a1b2c3d4-4444-4000-8000-aaaaaaaaa004 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-4444-4000-8000-aaaaaaaaa004/result + response: + body: + string: '{"id": "a1b2c3d4-4444-4000-8000-000000000004", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Thu, 29 Jan 2026 08:46:18 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-000000000195 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + 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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:19 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-000000000196 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a663b076-e4ce-4a22-a37a-f94b1937cd41", "type": "SQLEndpoint", "displayName": "fabcli000001", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a1b2c3d4-4444-4000-8000-000000000004", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '451' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:20 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-000000000197 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/sqlDatabases/a1b2c3d4-4444-4000-8000-000000000004 + response: + body: + string: '{"id": "a1b2c3d4-4444-4000-8000-000000000004", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "properties": {"connectionInfo": "Data Source=vwbb4lsqmqqejdvenqo7wshysy-m2op2dhqhnbu5asxjn3kvbsydy.database.fabric.microsoft.com,1433;Initial Catalog=fabcli000001-a1b2c3d4-4444-4000-8000-000000000004;Multiple Active Result Sets=False;Connect Timeout=30;Encrypt=True;Trust Server Certificate=False", "connectionString": "mock_connection_string", "databaseName": "fabcli000001-a1b2c3d4-4444-4000-8000-000000000004", "serverFqdn": "vwbb4lsqmqqejdvenqo7wshysy-m2op2dhqhnbu5asxjn3kvbsydy.database.fabric.microsoft.com,1433", "backupRetentionDays": 7, "collation": "SQL_Latin1_General_CP1_CI_AS"}}' + headers: + Access-Control-Expose-Headers: + - RequestId,ETag + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '438' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:21 GMT + ETag: + - '""' + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-000000000198 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items/a1b2c3d4-4444-4000-8000-000000000004/getDefinition + response: + body: + string: 'null' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '24' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:22 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-4444-4000-8000-bbbbbbbbb004 + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-000000000199 + Retry-After: + - '20' + 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-operation-id: + - a1b2c3d4-4444-4000-8000-bbbbbbbbb004 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-4444-4000-8000-bbbbbbbbb004 + response: + body: + string: '{"status": "Running", "createdTimeUtc": "2026-01-29T08:46:22.691334", "lastUpdatedTimeUtc": "2026-01-29T08:46:22.691334", "percentComplete": null, "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '121' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:44 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-4444-4000-8000-bbbbbbbbb004 + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-00000000019a + Retry-After: + - '20' + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a1b2c3d4-4444-4000-8000-bbbbbbbbb004 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-4444-4000-8000-bbbbbbbbb004 + response: + body: + string: '{"status": "Succeeded", "createdTimeUtc": "2026-01-29T08:46:22.691334", "lastUpdatedTimeUtc": "2026-01-29T08:46:51.5089905", "percentComplete": 100, "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,x-ms-operation-id + 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 08:47:06 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-4444-4000-8000-bbbbbbbbb004/result + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-00000000019b + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a1b2c3d4-4444-4000-8000-bbbbbbbbb004 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-4444-4000-8000-bbbbbbbbb004/result + response: + body: + string: '{"definition": {"format": "dacpac", "parts": [{"path": "fabcli000001.dacpac", "payload": "UEsDBBQAAAAIANZFPVzG6qC/qQIAALwHAAAJAAAAbW9kZWwueG1spVVdb9pAEHxOpf4Hy++1+VCbqjKJIgNNJEhIbKWqqgot9gInne+cu3ME+fXdw2ATCCm0D0jmvDOz7M4cweUi484zKs2k6LhNr+E6KBKZMjHruIWZfvrqXl58/BB0wUCUzDGDoUyRO33GsS9VBuaxBrdcp6ypztreZ9fp6vwWMuy4Q5YoqeXUeJbOi6Xk2isRXvTE7ac76cNEscQWTEBj+Xak5DNLUblOKDkHQ9yDhKWk2Wi3tw5Di0ChmWHPpNcHrtF16CcK3XHnxuTffF+vGLWXVc0kMvP1E5UqGoSfQuJHqBhw9rIi9VuNZstvtFyaw1lwjUCN2MezICy0kZlt1QnB4EyqZce9IvnbgnO9qqeqIRpIbU05hPq98wi8oJNYFdSlX3L6Nek7IveFNJjepCgMmzIazNtae2X/IRnKLKd5TBhnZmlNcEBzv24j2jxvnKj5gFNU5EfiiJc5UZBDSkccELe2tE+VJm3aoPJoqTkkG/U92EDOWAL8H5C9BRUJ4CNQpt7orxL8+yAsKvJcodZDpjVFrYs5CtpSwlD3lJKqplp7+KSx0ZTCLH0EMvGEo94a3tbxmjPwa0cHq2yXxD2OGdmmhm4SeZfbUFTupmjmqMyy2v46itUPiO4H4wEdieb4OwpUwMfhqDkOb8ZXUT2fHZobvYlJF6dQc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BlIjogIlNRTERhdGFiYXNlIiwKICAgICJkaXNwbGF5TmFtZSI6ICJmYWJjbGkwMDAwMDEiLAogICAgImRlc2NyaXB0aW9uIjogIkNyZWF0ZWQgYnkgZmFiIgogIH0sCiAgImNvbmZpZyI6IHsKICAgICJ2ZXJzaW9uIjogIjIuMCIsCiAgICAibG9naWNhbElkIjogIjAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwIgogIH0KfQ==", "payloadType": "InlineBase64"}]}}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Thu, 29 Jan 2026 08:47:07 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-00000000019c + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items/a1b2c3d4-4444-4000-8000-000000000004/connections + 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 08:47:08 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-00000000019d + 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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:47:08 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-00000000019e + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a663b076-e4ce-4a22-a37a-f94b1937cd41", "type": "SQLEndpoint", "displayName": "fabcli000001", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a1b2c3d4-4444-4000-8000-000000000004", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '451' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:47:09 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-00000000019f + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items/a1b2c3d4-4444-4000-8000-000000000004 + 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 08:47:10 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-4444-4000-8000-0000000001a0 + 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_mkdir/test_mkdir_sqldatabase_invalid_retention_days_failure.yaml b/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_sqldatabase_invalid_retention_days_failure.yaml new file mode 100644 index 00000000..460d975b --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_sqldatabase_invalid_retention_days_failure.yaml @@ -0,0 +1,146 @@ +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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:52 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-3333-4000-8000-00000000012c + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '366' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:53 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-3333-4000-8000-00000000012d + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '366' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:53 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-3333-4000-8000-00000000012e + 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_mkdir/test_mkdir_sqldatabase_param_discovery.yaml b/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_sqldatabase_param_discovery.yaml new file mode 100644 index 00000000..c3b2d105 --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_sqldatabase_param_discovery.yaml @@ -0,0 +1,146 @@ +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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:52 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-6666-4000-8000-000000000258 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '366' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:53 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-6666-4000-8000-000000000259 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '366' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:53 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-6666-4000-8000-00000000025a + 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_mkdir/test_mkdir_sqldatabase_partial_params_success.yaml b/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_sqldatabase_partial_params_success.yaml new file mode 100644 index 00000000..3505fedb --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_sqldatabase_partial_params_success.yaml @@ -0,0 +1,834 @@ +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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:52 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000c8 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '366' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:53 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000c9 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '366' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:53 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000ca + 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": "SQLDatabase", "folderId": null, "creationPayload": {"creationMode": "new", "backupRetentionDays": 21}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '176' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/sqlDatabases + response: + body: + string: 'null' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,ETag,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '24' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:55 GMT + ETag: + - '""' + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-2222-4000-8000-aaaaaaaaa002 + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000cb + Retry-After: + - '20' + 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-operation-id: + - a1b2c3d4-2222-4000-8000-aaaaaaaaa002 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-2222-4000-8000-aaaaaaaaa002 + response: + body: + string: '{"status": "Succeeded", "createdTimeUtc": "2026-01-29T08:45:54.7107629", "lastUpdatedTimeUtc": "2026-01-29T08:46:09.3926068", "percentComplete": 100, "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,x-ms-operation-id + 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 08:46:17 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-2222-4000-8000-aaaaaaaaa002/result + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000cc + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a1b2c3d4-2222-4000-8000-aaaaaaaaa002 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-2222-4000-8000-aaaaaaaaa002/result + response: + body: + string: '{"id": "a1b2c3d4-2222-4000-8000-000000000002", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Thu, 29 Jan 2026 08:46:18 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000cd + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + 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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:19 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000ce + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a663b076-e4ce-4a22-a37a-f94b1937cd41", "type": "SQLEndpoint", "displayName": "fabcli000001", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a1b2c3d4-2222-4000-8000-000000000002", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '451' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:20 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000cf + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/sqlDatabases/a1b2c3d4-2222-4000-8000-000000000002 + response: + body: + string: '{"id": "a1b2c3d4-2222-4000-8000-000000000002", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "properties": {"connectionInfo": "Data Source=vwbb4lsqmqqejdvenqo7wshysy-m2op2dhqhnbu5asxjn3kvbsydy.database.fabric.microsoft.com,1433;Initial Catalog=fabcli000001-a1b2c3d4-2222-4000-8000-000000000002;Multiple Active Result Sets=False;Connect Timeout=30;Encrypt=True;Trust Server Certificate=False", "connectionString": "mock_connection_string", "databaseName": "fabcli000001-a1b2c3d4-2222-4000-8000-000000000002", "serverFqdn": "vwbb4lsqmqqejdvenqo7wshysy-m2op2dhqhnbu5asxjn3kvbsydy.database.fabric.microsoft.com,1433", "backupRetentionDays": 7, "collation": "SQL_Latin1_General_CP1_CI_AS"}}' + headers: + Access-Control-Expose-Headers: + - RequestId,ETag + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '438' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:21 GMT + ETag: + - '""' + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000d0 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items/a1b2c3d4-2222-4000-8000-000000000002/getDefinition + response: + body: + string: 'null' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '24' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:22 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-2222-4000-8000-bbbbbbbbb002 + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000d1 + Retry-After: + - '20' + 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-operation-id: + - a1b2c3d4-2222-4000-8000-bbbbbbbbb002 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-2222-4000-8000-bbbbbbbbb002 + response: + body: + string: '{"status": "Running", "createdTimeUtc": "2026-01-29T08:46:22.691334", "lastUpdatedTimeUtc": "2026-01-29T08:46:22.691334", "percentComplete": null, "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '121' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:44 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-2222-4000-8000-bbbbbbbbb002 + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000d2 + Retry-After: + - '20' + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a1b2c3d4-2222-4000-8000-bbbbbbbbb002 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-2222-4000-8000-bbbbbbbbb002 + response: + body: + string: '{"status": "Succeeded", "createdTimeUtc": "2026-01-29T08:46:22.691334", "lastUpdatedTimeUtc": "2026-01-29T08:46:51.5089905", "percentComplete": 100, "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,x-ms-operation-id + 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 08:47:06 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-2222-4000-8000-bbbbbbbbb002/result + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000d3 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a1b2c3d4-2222-4000-8000-bbbbbbbbb002 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-2222-4000-8000-bbbbbbbbb002/result + response: + body: + string: '{"definition": {"format": "dacpac", "parts": [{"path": "fabcli000001.dacpac", "payload": "UEsDBBQAAAAIANZFPVzG6qC/qQIAALwHAAAJAAAAbW9kZWwueG1spVVdb9pAEHxOpf4Hy++1+VCbqjKJIgNNJEhIbKWqqgot9gInne+cu3ME+fXdw2ATCCm0D0jmvDOz7M4cweUi484zKs2k6LhNr+E6KBKZMjHruIWZfvrqXl58/BB0wUCUzDGDoUyRO33GsS9VBuaxBrdcp6ypztreZ9fp6vwWMuy4Q5YoqeXUeJbOi6Xk2isRXvTE7ac76cNEscQWTEBj+Xak5DNLUblOKDkHQ9yDhKWk2Wi3tw5Di0ChmWHPpNcHrtF16CcK3XHnxuTffF+vGLWXVc0kMvP1E5UqGoSfQuJHqBhw9rIi9VuNZstvtFyaw1lwjUCN2MezICy0kZlt1QnB4EyqZce9IvnbgnO9qqeqIRpIbU05hPq98wi8oJNYFdSlX3L6Nek7IveFNJjepCgMmzIazNtae2X/IRnKLKd5TBhnZmlNcEBzv24j2jxvnKj5gFNU5EfiiJc5UZBDSkccELe2tE+VJm3aoPJoqTkkG/U92EDOWAL8H5C9BRUJ4CNQpt7orxL8+yAsKvJcodZDpjVFrYs5CtpSwlD3lJKqplp7+KSx0ZTCLH0EMvGEo94a3tbxmjPwa0cHq2yXxD2OGdmmhm4SeZfbUFTupmjmqMyy2v46itUPiO4H4wEdieb4OwpUwMfhqDkOb8ZXUT2fHZobvYlJF6dQcHMn3vTuO0B9GuQHKEGbOAWlmJlfTaQ6oblQigSMbe8nQ55q+3Q8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WJjbGkwMDAwMDEiLAogICAgImRlc2NyaXB0aW9uIjogIkNyZWF0ZWQgYnkgZmFiIgogIH0sCiAgImNvbmZpZyI6IHsKICAgICJ2ZXJzaW9uIjogIjIuMCIsCiAgICAibG9naWNhbElkIjogIjAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwIgogIH0KfQ==", "payloadType": "InlineBase64"}]}}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Thu, 29 Jan 2026 08:47:07 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000d4 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items/a1b2c3d4-2222-4000-8000-000000000002/connections + 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 08:47:08 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000d5 + 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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:47:08 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000d6 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a663b076-e4ce-4a22-a37a-f94b1937cd41", "type": "SQLEndpoint", "displayName": "fabcli000001", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a1b2c3d4-2222-4000-8000-000000000002", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '451' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:47:09 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000d7 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items/a1b2c3d4-2222-4000-8000-000000000002 + 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 08:47:10 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-2222-4000-8000-0000000000d8 + 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_mkdir/test_mkdir_sqldatabase_without_params_success.yaml b/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_sqldatabase_without_params_success.yaml new file mode 100644 index 00000000..747d8c13 --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_mkdir/test_mkdir_sqldatabase_without_params_success.yaml @@ -0,0 +1,834 @@ +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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:52 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-000000000064 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '366' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:53 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-000000000065 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '366' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:53 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-000000000066 + 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": "SQLDatabase", "folderId": null}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '105' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/sqlDatabases + response: + body: + string: 'null' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,ETag,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '24' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:45:55 GMT + ETag: + - '""' + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-1111-4000-8000-aaaaaaaaa001 + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-000000000067 + Retry-After: + - '20' + 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-operation-id: + - a1b2c3d4-1111-4000-8000-aaaaaaaaa001 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-1111-4000-8000-aaaaaaaaa001 + response: + body: + string: '{"status": "Succeeded", "createdTimeUtc": "2026-01-29T08:45:54.7107629", "lastUpdatedTimeUtc": "2026-01-29T08:46:09.3926068", "percentComplete": 100, "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,x-ms-operation-id + 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 08:46:17 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-1111-4000-8000-aaaaaaaaa001/result + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-000000000068 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a1b2c3d4-1111-4000-8000-aaaaaaaaa001 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-1111-4000-8000-aaaaaaaaa001/result + response: + body: + string: '{"id": "a1b2c3d4-1111-4000-8000-000000000001", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Thu, 29 Jan 2026 08:46:18 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-000000000069 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + 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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:19 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-00000000006a + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a663b076-e4ce-4a22-a37a-f94b1937cd41", "type": "SQLEndpoint", "displayName": "fabcli000001", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a1b2c3d4-1111-4000-8000-000000000001", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '451' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:20 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-00000000006b + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/sqlDatabases/a1b2c3d4-1111-4000-8000-000000000001 + response: + body: + string: '{"id": "a1b2c3d4-1111-4000-8000-000000000001", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "properties": {"connectionInfo": "Data Source=vwbb4lsqmqqejdvenqo7wshysy-m2op2dhqhnbu5asxjn3kvbsydy.database.fabric.microsoft.com,1433;Initial Catalog=fabcli000001-a1b2c3d4-1111-4000-8000-000000000001;Multiple Active Result Sets=False;Connect Timeout=30;Encrypt=True;Trust Server Certificate=False", "connectionString": "mock_connection_string", "databaseName": "fabcli000001-a1b2c3d4-1111-4000-8000-000000000001", "serverFqdn": "vwbb4lsqmqqejdvenqo7wshysy-m2op2dhqhnbu5asxjn3kvbsydy.database.fabric.microsoft.com,1433", "backupRetentionDays": 7, "collation": "SQL_Latin1_General_CP1_CI_AS"}}' + headers: + Access-Control-Expose-Headers: + - RequestId,ETag + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '438' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:21 GMT + ETag: + - '""' + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-00000000006c + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items/a1b2c3d4-1111-4000-8000-000000000001/getDefinition + response: + body: + string: 'null' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '24' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:22 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-1111-4000-8000-bbbbbbbbb001 + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-00000000006d + Retry-After: + - '20' + 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-operation-id: + - a1b2c3d4-1111-4000-8000-bbbbbbbbb001 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-1111-4000-8000-bbbbbbbbb001 + response: + body: + string: '{"status": "Running", "createdTimeUtc": "2026-01-29T08:46:22.691334", "lastUpdatedTimeUtc": "2026-01-29T08:46:22.691334", "percentComplete": null, "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '121' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:46:44 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-1111-4000-8000-bbbbbbbbb001 + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-00000000006e + Retry-After: + - '20' + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a1b2c3d4-1111-4000-8000-bbbbbbbbb001 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-1111-4000-8000-bbbbbbbbb001 + response: + body: + string: '{"status": "Succeeded", "createdTimeUtc": "2026-01-29T08:46:22.691334", "lastUpdatedTimeUtc": "2026-01-29T08:46:51.5089905", "percentComplete": 100, "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,x-ms-operation-id + 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 08:47:06 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-1111-4000-8000-bbbbbbbbb001/result + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-00000000006f + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a1b2c3d4-1111-4000-8000-bbbbbbbbb001 + 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://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a1b2c3d4-1111-4000-8000-bbbbbbbbb001/result + response: + body: + string: '{"definition": {"format": "dacpac", "parts": [{"path": "fabcli000001.dacpac", "payload": "UEsDBBQAAAAIANZFPVzG6qC/qQIAALwHAAAJAAAAbW9kZWwueG1spVVdb9pAEHxOpf4Hy++1+VCbqjKJIgNNJEhIbKWqqgot9gInne+cu3ME+fXdw2ATCCm0D0jmvDOz7M4cweUi484zKs2k6LhNr+E6KBKZMjHruIWZfvrqXl58/BB0wUCUzDGDoUyRO33GsS9VBuaxBrdcp6ypztreZ9fp6vwWMuy4Q5YoqeXUeJbOi6Xk2isRXvTE7ac76cNEscQWTEBj+Xak5DNLUblOKDkHQ9yDhKWk2Wi3tw5Di0ChmWHPpNcHrtF16CcK3XHnxuTffF+vGLWXVc0kMvP1E5UqGoSfQuJHqBhw9rIi9VuNZstvtFyaw1lwjUCN2MezICy0kZlt1QnB4EyqZce9IvnbgnO9qqeqIRpIbU05hPq98wi8oJNYFdSlX3L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W0NvbnRlbnRfVHlwZXNdLnhtbFBLBQYAAAAABAAEAO0AAAC4BgAAAAA=", "payloadType": "InlineBase64"}, {"path": ".platform", "payload": "ewogICIkc2NoZW1hIjogImh0dHBzOi8vZGV2ZWxvcGVyLm1pY3Jvc29mdC5jb20vanNvbi1zY2hlbWFzL2ZhYnJpYy9naXRJbnRlZ3JhdGlvbi9wbGF0Zm9ybVByb3BlcnRpZXMvMi4wLjAvc2NoZW1hLmpzb24iLAogICJtZXRhZGF0YSI6IHsKICAgICJ0eXBlIjogIlNRTERhdGFiYXNlIiwKICAgICJkaXNwbGF5TmFtZSI6ICJmYWJjbGkwMDAwMDEiLAogICAgImRlc2NyaXB0aW9uIjogIkNyZWF0ZWQgYnkgZmFiIgogIH0sCiAgImNvbmZpZyI6IHsKICAgICJ2ZXJzaW9uIjogIjIuMCIsCiAgICAibG9naWNhbElkIjogIjAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwIgogIH0KfQ==", "payloadType": "InlineBase64"}]}}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Thu, 29 Jan 2026 08:47:07 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-000000000070 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items/a1b2c3d4-1111-4000-8000-000000000001/connections + 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 08:47:08 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-000000000071 + 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": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2303' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:47:08 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-000000000072 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items + response: + body: + string: '{"value": [{"id": "8ff3aa09-ab5f-4bd0-8dfe-7e76102342f2", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "e452ddb1-e702-4539-a178-c2f645e9bfd8", "type": "SemanticModel", "displayName": "fabcli000001_auto", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "ef2fc02e-6cb7-4813-b293-f5d5b98c5d9a", "type": "SQLEndpoint", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "d74d91a8-7679-40a2-9962-55e3d3aefda2", "type": "Warehouse", "displayName": "StagingWarehouseForDataflows_20260129084026", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a663b076-e4ce-4a22-a37a-f94b1937cd41", "type": "SQLEndpoint", "displayName": "fabcli000001", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "49b99e73-f31e-473d-9fe4-085031b70124", "type": "Lakehouse", "displayName": "StagingLakehouseForDataflows_20260129083942", "description": "", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}, {"id": "a1b2c3d4-1111-4000-8000-000000000001", "type": "SQLDatabase", "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": "0cfd9c66-3bf0-4e43-8257-4b76aa86581e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '451' + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 29 Jan 2026 08:47:09 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-000000000073 + 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/0cfd9c66-3bf0-4e43-8257-4b76aa86581e/items/a1b2c3d4-1111-4000-8000-000000000001 + 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 08:47:10 GMT + Pragma: + - no-cache + RequestId: + - a1b2c3d4-1111-4000-8000-000000000074 + 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_mkdir.py b/tests/test_commands/test_mkdir.py index 15074d03..69281f23 100644 --- a/tests/test_commands/test_mkdir.py +++ b/tests/test_commands/test_mkdir.py @@ -31,8 +31,8 @@ from fabric_cli.errors import ErrorMessages from tests.test_commands.conftest import ( item_type_paramerter, - unsupported_item_failure_params, mkdir_item_with_creation_payload_success_params, + unsupported_item_failure_params, ) from tests.test_commands.data.models import EntityMetadata from tests.test_commands.data.static_test_data import StaticTestData @@ -286,6 +286,154 @@ def test_mkdir_item_with_creation_payload_success( # Cleanup rm(item_full_path) + # region SQL database + def test_mkdir_sqldatabase_without_params_success( + self, + workspace, + cli_executor, + mock_print_done, + mock_questionary_print, + vcr_instance, + cassette_name, + upsert_item_to_cache, + ): + # Setup + sqldb_display_name = generate_random_string(vcr_instance, cassette_name) + sqldb_full_path = cli_path_join( + workspace.full_path, f"{sqldb_display_name}.{ItemType.SQL_DATABASE}" + ) + + # Execute command without -P flag + cli_executor.exec_command(f"mkdir {sqldb_full_path}") + + # Assert creation success + upsert_item_to_cache.assert_called_once() + mock_print_done.assert_called_once() + assert sqldb_display_name in mock_print_done.call_args[0][0] + + # Verify item was created without creationPayload + mock_questionary_print.reset_mock() + get(sqldb_full_path, query=".") + mock_questionary_print.assert_called_once() + result_output = mock_questionary_print.call_args[0][0] + assert sqldb_display_name in result_output + assert "creationPayload" not in result_output + + # Cleanup + rm(sqldb_full_path) + + def test_mkdir_sqldatabase_partial_params_success( + self, + workspace, + cli_executor, + mock_print_done, + mock_questionary_print, + vcr_instance, + cassette_name, + upsert_item_to_cache, + ): + # Setup + sqldb_display_name = generate_random_string(vcr_instance, cassette_name) + sqldb_full_path = cli_path_join( + workspace.full_path, f"{sqldb_display_name}.{ItemType.SQL_DATABASE}" + ) + + # Execute command with only backupRetentionDays (no collation) + cli_executor.exec_command(f"mkdir {sqldb_full_path} -P backupRetentionDays=21") + + # Assert creation success + upsert_item_to_cache.assert_called_once() + mock_print_done.assert_called_once() + assert sqldb_display_name in mock_print_done.call_args[0][0] + + # Verify item was created with properties + mock_questionary_print.reset_mock() + get(sqldb_full_path, query=".") + mock_questionary_print.assert_called_once() + result_output = mock_questionary_print.call_args[0][0] + assert sqldb_display_name in result_output + + # Cleanup + rm(sqldb_full_path) + + def test_mkdir_sqldatabase_invalid_retention_days_failure( + self, + workspace, + cli_executor, + assert_fabric_cli_error, + vcr_instance, + cassette_name, + ): + # Setup + sqldb_display_name = generate_random_string(vcr_instance, cassette_name) + sqldb_full_path = cli_path_join( + workspace.full_path, f"{sqldb_display_name}.{ItemType.SQL_DATABASE}" + ) + + # Execute command with invalid backupRetentionDays + cli_executor.exec_command(f"mkdir {sqldb_full_path} -P backupRetentionDays=abc") + + # Assert failure due to invalid integer + assert_fabric_cli_error(constant.ERROR_INVALID_INPUT) + + def test_mkdir_sqldatabase_explicit_mode_success( + self, + workspace, + cli_executor, + mock_print_done, + mock_questionary_print, + vcr_instance, + cassette_name, + upsert_item_to_cache, + ): + # Setup + sqldb_display_name = generate_random_string(vcr_instance, cassette_name) + sqldb_full_path = cli_path_join( + workspace.full_path, f"{sqldb_display_name}.{ItemType.SQL_DATABASE}" + ) + + # Execute command with explicit mode + cli_executor.exec_command(f"mkdir {sqldb_full_path} -P mode=new") + + # Assert creation success + upsert_item_to_cache.assert_called_once() + mock_print_done.assert_called_once() + assert sqldb_display_name in mock_print_done.call_args[0][0] + + # Verify item was created with properties + mock_questionary_print.reset_mock() + get(sqldb_full_path, query=".") + mock_questionary_print.assert_called_once() + result_output = mock_questionary_print.call_args[0][0] + assert sqldb_display_name in result_output + + # Cleanup + rm(sqldb_full_path) + + def test_mkdir_sqldatabase_param_discovery( + self, workspace, cli_executor, mock_questionary_print + ): + # Setup + sqldb_full_path = cli_path_join( + workspace.full_path, f"paramDiscovery.{ItemType.SQL_DATABASE}" + ) + + # Execute command with -P but no value + cli_executor.exec_command(f"mkdir {sqldb_full_path} -P") + + # Assert param discovery message is printed + no_params_message = ( + "Params for '.SQLDatabase'. Use key=value separated by commas." + ) + output = mock_questionary_print.call_args[0][0] + assert no_params_message in output + assert "backupRetentionDays" in output + assert "collation" in output + assert "mode" in output + + # endregion + + # region Data Factory def test_mkdir_mounted_data_factory_with_required_params_success( self, workspace, diff --git a/tests/test_utils/test_fab_cmd_mkdir_utils.py b/tests/test_utils/test_fab_cmd_mkdir_utils.py index 987d71e3..7d249164 100644 --- a/tests/test_utils/test_fab_cmd_mkdir_utils.py +++ b/tests/test_utils/test_fab_cmd_mkdir_utils.py @@ -10,9 +10,12 @@ from fabric_cli.core.fab_exceptions import FabricCLIError from fabric_cli.errors import ErrorMessages from fabric_cli.utils.fab_cmd_mkdir_utils import ( + add_type_specific_payload, find_mpe_connection, get_connection_config_from_params, + get_params_per_item_type, ) +from fabric_cli.core.fab_types import ItemType def test_fabric_data_pipelines_workspace_identity_no_params_success(): @@ -209,4 +212,147 @@ def test_find_mpe_connection_return_403_success(self): called_url = call_args.args[1] if len(call_args.args) > 1 else call_args.kwargs['url'] assert "privateEndpointConnections" in called_url assert "api-version=2023-11-01" in called_url + + +class TestGetParamsPerItemTypeSqlDatabase: + """Test cases for get_params_per_item_type with SQL_DATABASE.""" + + def test_sql_database_returns_optional_params(self): + """Test that SQL_DATABASE returns the correct optional params.""" + mock_item = Mock() + mock_item.item_type = ItemType.SQL_DATABASE + + required, optional = get_params_per_item_type(mock_item) + + assert required == [] + assert optional == ["mode", "backupRetentionDays", "collation"] + + def test_sql_database_has_no_required_params(self): + """Test that SQL_DATABASE has no required params.""" + mock_item = Mock() + mock_item.item_type = ItemType.SQL_DATABASE + + required, _ = get_params_per_item_type(mock_item) + + assert len(required) == 0 + + +class TestAddTypeSpecificPayloadSqlDatabase: + """Test cases for add_type_specific_payload with SQL_DATABASE.""" + + def _make_item_and_args(self, params): + """Helper to create mock item and args for SQL_DATABASE.""" + mock_item = Mock() + mock_item.item_type = ItemType.SQL_DATABASE + mock_args = Namespace(params=params) + return mock_item, mock_args + + def test_all_params_success(self): + """Test SQL_DATABASE with all params provided.""" + item, args = self._make_item_and_args( + { + "mode": "new", + "backupretentiondays": "21", + "collation": "SQL_Latin1_General_CP1_CI_AS", + } + ) + payload = {"displayName": "testdb"} + + result = add_type_specific_payload(item, args, payload) + + assert "creationPayload" in result + cp = result["creationPayload"] + assert cp["creationMode"] == "new" + assert cp["backupRetentionDays"] == 21 + assert cp["collation"] == "SQL_Latin1_General_CP1_CI_AS" + + def test_partial_params_backup_only_success(self): + """Test SQL_DATABASE with only backupRetentionDays provided.""" + item, args = self._make_item_and_args({"backupretentiondays": "7"}) + payload = {"displayName": "testdb"} + + result = add_type_specific_payload(item, args, payload) + + assert "creationPayload" in result + cp = result["creationPayload"] + assert cp["creationMode"] == "new" # Default + assert cp["backupRetentionDays"] == 7 + assert "collation" not in cp + + def test_partial_params_collation_only_success(self): + """Test SQL_DATABASE with only collation provided.""" + item, args = self._make_item_and_args( + {"collation": "SQL_Latin1_General_CP1_CI_AS"} + ) + payload = {"displayName": "testdb"} + + result = add_type_specific_payload(item, args, payload) + + assert "creationPayload" in result + cp = result["creationPayload"] + assert cp["creationMode"] == "new" # Default + assert "backupRetentionDays" not in cp + assert cp["collation"] == "SQL_Latin1_General_CP1_CI_AS" + + def test_no_recognized_params_no_creation_payload(self): + """Test SQL_DATABASE with no recognized params produces no creationPayload.""" + item, args = self._make_item_and_args({"unrelated": "value"}) + payload = {"displayName": "testdb"} + + result = add_type_specific_payload(item, args, payload) + + assert "creationPayload" not in result + + def test_empty_params_no_creation_payload(self): + """Test SQL_DATABASE with empty params dict produces no creationPayload.""" + item, args = self._make_item_and_args({}) + payload = {"displayName": "testdb"} + + result = add_type_specific_payload(item, args, payload) + + assert "creationPayload" not in result + + def test_invalid_backup_retention_days_failure(self): + """Test SQL_DATABASE with non-integer backupRetentionDays raises FabricCLIError.""" + item, args = self._make_item_and_args({"backupretentiondays": "abc"}) + payload = {"displayName": "testdb"} + + with pytest.raises(FabricCLIError) as exc_info: + add_type_specific_payload(item, args, payload) + + assert "abc" in str(exc_info.value.message) + assert "integer" in str(exc_info.value.message) + assert exc_info.value.status_code == fab_constant.ERROR_INVALID_INPUT + + def test_explicit_mode_success(self): + """Test SQL_DATABASE with explicit mode value.""" + item, args = self._make_item_and_args({"mode": "copy"}) + payload = {"displayName": "testdb"} + + result = add_type_specific_payload(item, args, payload) + + assert result["creationPayload"]["creationMode"] == "copy" + + def test_mode_only_success(self): + """Test SQL_DATABASE with only mode provided.""" + item, args = self._make_item_and_args({"mode": "new"}) + payload = {"displayName": "testdb"} + + result = add_type_specific_payload(item, args, payload) + + cp = result["creationPayload"] + assert cp["creationMode"] == "new" + assert "backupRetentionDays" not in cp + assert "collation" not in cp + + def test_preserves_existing_payload_fields(self): + """Test that SQL_DATABASE creation doesn't remove existing payload fields.""" + item, args = self._make_item_and_args({"mode": "new"}) + payload = {"displayName": "testdb", "description": "A test database"} + + result = add_type_specific_payload(item, args, payload) + + assert result["displayName"] == "testdb" + assert result["description"] == "A test database" + assert "creationPayload" in result \ No newline at end of file