diff --git a/.changes/unreleased/added-20251120-143304.yaml b/.changes/unreleased/added-20251120-143304.yaml new file mode 100644 index 000000000..4287b1342 --- /dev/null +++ b/.changes/unreleased/added-20251120-143304.yaml @@ -0,0 +1,3 @@ +kind: added +body: Support filtering base on JMESPath for ls using -q flag +time: 2025-11-20T14:33:04.564732218Z diff --git a/.changes/unreleased/added-20251127-181226.yaml b/.changes/unreleased/added-20251127-181226.yaml new file mode 100644 index 000000000..33a8953a9 --- /dev/null +++ b/.changes/unreleased/added-20251127-181226.yaml @@ -0,0 +1,3 @@ +kind: added +body: Enforce CLI parameter values must be wrapped in single (') or double (") quotes. +time: 2025-11-27T18:12:26.528482123Z diff --git a/docs/commands/acls/index.md b/docs/commands/acls/index.md index cac4c14ab..a49731112 100644 --- a/docs/commands/acls/index.md +++ b/docs/commands/acls/index.md @@ -28,13 +28,14 @@ List access control entries for a workspace, item, or OneLake resource. **Usage:** ``` -fab acl ls [-l] +fab acl ls [-l] [-q ] ``` **Parameters:** - ``: Path to the resource. - `-l, --long`: Show detailed output. Optional. +- `-q, --query`: JMESPath query to filter results. Optional. **Examples:** @@ -42,6 +43,7 @@ fab acl ls [-l] fab acl ls workspace1.workspace fab acl ls lh1.lakehouse -l fab acl ls /Files/data -l +fab acl ls workspace1.workspace -q [].[?role=='Admin'] ``` --- diff --git a/docs/commands/fs/ls.md b/docs/commands/fs/ls.md index eb1786eed..fddfd6dd8 100644 --- a/docs/commands/fs/ls.md +++ b/docs/commands/fs/ls.md @@ -7,7 +7,7 @@ List workspaces, items, and files. **Usage:** ``` -fab ls [-l] [-a] +fab ls [-l] [-a] [-q ] ``` **Parameters:** @@ -15,9 +15,16 @@ fab ls [-l] [-a] - ``: Path to list. Optional. - `-l, --long`: Show detailed output. Optional. - `-a, --all`: Show hidden entities. Optional. +- `-q, --query`: JMESPath query to filter results. Optional. -**Example:** +**Examples:** ``` fab ls ws1.Workspace +fab ls -l + +# Using JEMSPath to filter items within ws1 workspace +fab ls -l -q [].{name:name} +fab ls ws1.Workspace -q [?contains(name, 'report')] +fab ls -l -q [?id=='123456'] ``` \ No newline at end of file diff --git a/docs/examples/acl_examples.md b/docs/examples/acl_examples.md index 2ae9d0de4..58dc24917 100644 --- a/docs/examples/acl_examples.md +++ b/docs/examples/acl_examples.md @@ -38,6 +38,10 @@ fab acl ls ws1.Workspace # List detailed workspace permissions fab acl ls ws1.Workspace -l + +# List specific columns using query parameter +fab acl ls ws1.Workspace -q identity # Show only identity column +fab acl ls ws1.Workspace -q [].[identity,type] # Show identity and type columns ``` #### List Item Permissions @@ -47,6 +51,10 @@ fab acl ls ws1.Workspace/lh1.Lakehouse # List detailed item permissions fab acl ls ws1.Workspace/lh1.Lakehouse -l + +# List specific columns for item permissions +fab acl ls ws1.Workspace/lh1.Lakehouse -q [].type # Show only type column +fab acl ls ws1.Workspace/lh1.Lakehouse -q '[].{name: name, type: type}' # Show name and type columns ``` #### List OneLake RBAC Permissions diff --git a/docs/examples/config_examples.md b/docs/examples/config_examples.md index 0f9af19f2..49342d5c2 100644 --- a/docs/examples/config_examples.md +++ b/docs/examples/config_examples.md @@ -35,7 +35,6 @@ Retrieve a list of configuration keys and values fab config ls ``` - ## Set Configuration Settings ### Enable/Disable Cache diff --git a/docs/examples/connection_examples.md b/docs/examples/connection_examples.md index e66ebdba4..cb809f15e 100644 --- a/docs/examples/connection_examples.md +++ b/docs/examples/connection_examples.md @@ -51,7 +51,7 @@ fab create .connections/conn.Connection -P gateway=MyVnetGateway.Gateway,connect Create a connection that uses a specific on-premises gateway with encrypted credentials for secure access ``` -fab create .connections/conn.Connection -P gateway=MyVnetGateway.Gateway,connectionDetails.type=SQL,connectionDetails.parameters.server=,connectionDetails.parameters.database=sales,credentialDetails.type=Basic,credentialDetails.values=[{"gatewayId":"", "encryptedCredentials": ""}] +fab create .connections/conn.Connection -P gateway=MyVnetGateway.Gateway,connectionDetails.type=SQL,connectionDetails.parameters.server=,connectionDetails.parameters.database=sales,credentialDetails.type=Basic,credentialDetails.values='[{"gatewayId":"", "encryptedCredentials": ""}]' ``` #### Create Connection with All Parameters diff --git a/docs/examples/item_examples.md b/docs/examples/item_examples.md index d6236d3d0..a3f492dcc 100644 --- a/docs/examples/item_examples.md +++ b/docs/examples/item_examples.md @@ -134,6 +134,15 @@ Show items with comprehensive metadata. fab ls ws1.Workspace -l ``` +#### Query List Items in Workspace + +``` +fab ls ws1.Workspace -q [].name +fab ls ws1.Workspace -q [].{name:name,id:id} +fab ls ws1.Workspace -q [?contains(name, 'Notebook')] +fab ls ws1.Workspace -l -q [?contains(name, 'Dataflow')].{name:name, id:id} +``` + #### List Item Contents Browse contents of items that support folder structures. diff --git a/src/fabric_cli/commands/acls/fab_acls_ls.py b/src/fabric_cli/commands/acls/fab_acls_ls.py index 2a8b5e14d..7f6347bcf 100644 --- a/src/fabric_cli/commands/acls/fab_acls_ls.py +++ b/src/fabric_cli/commands/acls/fab_acls_ls.py @@ -81,11 +81,10 @@ def _ls_acls_workspace(workspace: Workspace, args: Namespace) -> None: } ) sorted_acls = sorted(sorted_acls, key=lambda acl: acl["acl"]) - columns = ( - ["acl", "identity", "type", "objectId", "name"] - if show_all - else ["acl", "identity", "type"] - ) + columns = ["acl", "identity", "type"] + + if show_all: + columns.extend(["objectId", "name"]) utils_ls.format_and_print_output( data=sorted_acls, @@ -132,11 +131,11 @@ def _ls_acls_gateway(gateway: VirtualWorkspaceItem, args: Namespace) -> None: ) sorted_acls = sorted(sorted_acls, key=lambda acl: acl["role"]) - columns = ( - ["id", "role", "principalId", "principalType"] - if show_all - else ["role", "principalId", "principalType"] - ) + + columns = ["role", "principalId", "principalType"] + if show_all: + columns.insert(0, "id") + utils_ls.format_and_print_output( data=sorted_acls, columns=columns, @@ -169,11 +168,10 @@ def _ls_acls_connection(connection: VirtualWorkspaceItem, args: Namespace) -> No ) sorted_acls = sorted(sorted_acls, key=lambda acl: acl["role"]) - columns = ( - ["id", "role", "principalId", "principalType"] - if show_all - else ["role", "principalId", "principalType"] - ) + + columns = ["role", "principalId", "principalType"] + if show_all: + columns.insert(0, "id") utils_ls.format_and_print_output( data=sorted_acls, @@ -221,11 +219,11 @@ def _ls_acls_item(item: Item, args: Namespace) -> None: ) sorted_acls = sorted(sorted_acls, key=lambda acl: acl["acl"]) - columns = ( - ["acl", "identity", "type", "id", "name"] - if show_all - else ["acl", "identity", "type"] - ) + + columns = ["acl", "identity", "type"] + if show_all: + columns = ["id", "name"] + columns + utils_ls.format_and_print_output( data=sorted_acls, columns=columns, @@ -292,11 +290,9 @@ def _ls_acls_onelake(context: OneLakeItem, args: Namespace) -> None: ) sorted_acls = sorted(sorted_acls, key=lambda acl: acl["acl"]) - columns = ( - ["acl", "identity", "type", "details"] - if show_all - else ["acl", "identity", "type"] - ) + columns = ["acl", "identity", "type"] + if show_all: + columns = ["id", "name"] + columns utils_ls.format_and_print_output( data=sorted_acls, columns=columns, diff --git a/src/fabric_cli/commands/fs/ls/fab_fs_ls_item.py b/src/fabric_cli/commands/fs/ls/fab_fs_ls_item.py index e8abb8949..f2e1e19a7 100644 --- a/src/fabric_cli/commands/fs/ls/fab_fs_ls_item.py +++ b/src/fabric_cli/commands/fs/ls/fab_fs_ls_item.py @@ -8,7 +8,7 @@ from fabric_cli.core.hiearchy.fab_folder import Folder from fabric_cli.core.hiearchy.fab_hiearchy import Item, Workspace from fabric_cli.utils import fab_cmd_fs_utils as utils_fs -from fabric_cli.utils import fab_ui as utils_ui +from fabric_cli.utils import fab_cmd_ls_utils as utils_ls def exec(workspace: Workspace, args): @@ -21,9 +21,10 @@ def exec(workspace: Workspace, args): show_all or fab_state_config.get_config(fab_constant.FAB_SHOW_HIDDEN) == "true" ) - utils_ui.print_output_format( - args, + utils_ls.format_and_print_output( data=sorted_elements_dict, + args=args, + show_details=show_details, + columns=sorted_elements_dict[0].keys() if sorted_elements_dict else [], hidden_data=VirtualItemContainerType if show_hidden else None, - show_headers=show_details, ) diff --git a/src/fabric_cli/core/fab_constant.py b/src/fabric_cli/core/fab_constant.py index 35f057567..139fe37a1 100644 --- a/src/fabric_cli/core/fab_constant.py +++ b/src/fabric_cli/core/fab_constant.py @@ -256,6 +256,7 @@ ERROR_INVALID_PATH = "InvalidPath" ERROR_INVALID_PROPERTY = "InvalidProperty" ERROR_INVALID_DETLA_TABLE = "InvalidDeltaTable" +ERROR_INVALID_QUERY_FIELDS = "InvalidQueryFields" ERROR_INVALID_WORKSPACE_TYPE = "InvalidWorkspaceType" ERROR_INVALID_QUERY = "InvalidQuery" ERROR_INTERNAL_SERVER_ERROR = "InternalServerError" diff --git a/src/fabric_cli/core/fab_interactive.py b/src/fabric_cli/core/fab_interactive.py index 55db77294..7216f72b5 100644 --- a/src/fabric_cli/core/fab_interactive.py +++ b/src/fabric_cli/core/fab_interactive.py @@ -2,6 +2,7 @@ # Licensed under the MIT License. import html +import shlex from prompt_toolkit import HTML, PromptSession from prompt_toolkit.cursor_shapes import CursorShape @@ -38,7 +39,7 @@ def handle_command(self, command): """Process the user command.""" fab_logger.print_log_file_path() - command_parts = command.strip().split() # Split the command into parts + command_parts = shlex.split(command.strip()) # Split the command into parts # Handle special commands first if command in fab_constant.INTERACTIVE_QUIT_COMMANDS: diff --git a/src/fabric_cli/errors/common.py b/src/fabric_cli/errors/common.py index d98665462..86368bae0 100644 --- a/src/fabric_cli/errors/common.py +++ b/src/fabric_cli/errors/common.py @@ -17,6 +17,10 @@ def invalid_entries_format() -> str: def invalid_jmespath_query() -> str: return f"Invalid jmespath query (https://jmespath.org)" + @staticmethod + def invalid_parameter(invalid_query_fields: list, valid_columns: list) -> str: + return f"Invalid query field(s): {', '.join(invalid_query_fields)}. Available fields: {', '.join(valid_columns)}" + @staticmethod def invalid_hostname(hostname: str) -> str: return f"Invalid hostname for '{hostname}'" diff --git a/src/fabric_cli/parsers/fab_acls_parser.py b/src/fabric_cli/parsers/fab_acls_parser.py index 4c03de8ac..db822693c 100644 --- a/src/fabric_cli/parsers/fab_acls_parser.py +++ b/src/fabric_cli/parsers/fab_acls_parser.py @@ -51,6 +51,13 @@ def register_parser(subparsers: _SubParsersAction) -> None: action="store_true", help="Show detailed output. Optional", ) + ls_parser.add_argument( + "-q", + "--query", + metavar="", + required=False, + help="JMESPath query to filter. Optional", + ) ls_parser.usage = f"{utils_error_parser.get_usage_prog(ls_parser)}" ls_parser.set_defaults(func=acls.ls_command) diff --git a/src/fabric_cli/parsers/fab_fs_parser.py b/src/fabric_cli/parsers/fab_fs_parser.py index c6d9f5a1f..85a3170fe 100644 --- a/src/fabric_cli/parsers/fab_fs_parser.py +++ b/src/fabric_cli/parsers/fab_fs_parser.py @@ -15,7 +15,10 @@ def register_ls_parser(subparsers: _SubParsersAction) -> None: "# list all workspaces with details", "$ ls -l\n", "# list lakehouse tables", - "$ ls ws1.Workspace/lh1.Lakehouse/Tables", + "$ ls ws1.Workspace/lh1.Lakehouse/Tables\n", + "# list items with name matching a pattern", + "$ ls -q [].name", + "$ ls -q [?contains(name, 'Report')]\n", ] ls_parser = subparsers.add_parser( @@ -43,6 +46,13 @@ def register_ls_parser(subparsers: _SubParsersAction) -> None: action="store_true", help="Show all. Optional", ) + ls_parser.add_argument( + "-q", + "--query", + metavar="", + required=False, + help="JMESPath query to filter. Optional", + ) ls_parser.usage = f"{utils_error_parser.get_usage_prog(ls_parser)}" ls_parser.set_defaults(func=fs.ls_command) diff --git a/src/fabric_cli/utils/fab_cmd_ls_utils.py b/src/fabric_cli/utils/fab_cmd_ls_utils.py index dd1018821..f843a06e0 100644 --- a/src/fabric_cli/utils/fab_cmd_ls_utils.py +++ b/src/fabric_cli/utils/fab_cmd_ls_utils.py @@ -7,8 +7,8 @@ from fabric_cli.client import fab_api_capacity as capacity_api from fabric_cli.client import fab_api_workspace as workspace_api from fabric_cli.core.hiearchy.fab_hiearchy import VirtualWorkspaceItem -from fabric_cli.utils import fab_ui as utils_ui - +from fabric_cli.utils import fab_ui as utils_ui, fab_util +from fabric_cli.utils import fab_jmespath as utils_jmespath def sort_elements( elements: list[dict[str, str]], key: str = "name" @@ -76,11 +76,13 @@ def format_and_print_output( columns: list[str] = [], hidden_data=None, ) -> None: - - filtered_data = [ - {key: item[key] for key in columns if key in item} for item in data - ] + # Project the columns requested by the user based on JMESPath if query is provided else project the columns requested based on item type + if getattr(args, "query", None): + args.query = fab_util.process_nargs(args.query) + filtered_data = utils_jmespath.search(data, args.query) + else: + filtered_data = [{key: item[key] for key in columns if key in item} for item in data] utils_ui.print_output_format( args, show_headers=show_details, data=filtered_data, hidden_data=hidden_data - ) + ) \ No newline at end of file diff --git a/src/fabric_cli/utils/fab_jmespath.py b/src/fabric_cli/utils/fab_jmespath.py index bcc45cc6b..9ba5ee2b2 100644 --- a/src/fabric_cli/utils/fab_jmespath.py +++ b/src/fabric_cli/utils/fab_jmespath.py @@ -9,7 +9,6 @@ from fabric_cli.core import fab_constant from fabric_cli.core.fab_exceptions import FabricCLIError from fabric_cli.errors import ErrorMessages -from fabric_cli.utils import fab_ui # Redis and others built some custom functions # https://redis.io/docs/latest/integrate/redis-data-integration/reference/jmespath-custom-functions/ diff --git a/src/fabric_cli/utils/fab_ui.py b/src/fabric_cli/utils/fab_ui.py index 464dd8a50..c46843aa1 100644 --- a/src/fabric_cli/utils/fab_ui.py +++ b/src/fabric_cli/utils/fab_ui.py @@ -251,7 +251,7 @@ def display_help( # ascii Display -def get_visual_length(entry: Any, field: Any) -> int: +def get_visual_length(entry: dict, field: Any) -> int: return _get_visual_length(str(entry.get(field, ""))) @@ -355,7 +355,10 @@ def _print_output_format_result_text(output: FabricCLIOutput) -> None: or show_headers ): data_keys = output.result.get_data_keys() if output_result.data else [] - print_entries_unix_style(output_result.data, data_keys, header=show_headers) + if len(data_keys) > 0: + print_entries_unix_style(output_result.data, data_keys, header=(len(data_keys) > 1 or show_headers)) + else: + _print_raw_data(output_result.data) elif output.show_key_value_list: _print_entries_key_value_list_style(output_result.data) else: diff --git a/tests/test_commands/recordings/test_commands/test_acls/class_setup.yaml b/tests/test_commands/recordings/test_commands/test_acls/class_setup.yaml index 8411aeef8..0ba6844d5 100644 --- a/tests/test_commands/recordings/test_commands/test_acls/class_setup.yaml +++ b/tests/test_commands/recordings/test_commands/test_acls/class_setup.yaml @@ -11,12 +11,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.0.0 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": "My workspace", "description": "", "type": "Personal"}]}' headers: Access-Control-Expose-Headers: @@ -26,15 +26,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '323' + - '1517' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 17:14:24 GMT + - Thu, 13 Nov 2025 15:48:00 GMT Pragma: - no-cache RequestId: - - 18cf47f1-806d-417a-b7b9-dd005373c217 + - 1a2981fc-4e33-4315-84da-a7aa94a118f5 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -42,7 +42,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -60,12 +60,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.0.0 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": "My workspace", "description": "", "type": "Personal"}]}' headers: Access-Control-Expose-Headers: @@ -75,15 +75,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '323' + - '1517' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 17:14:24 GMT + - Thu, 13 Nov 2025 15:48:00 GMT Pragma: - no-cache RequestId: - - ae7f1926-5d31-495c-854f-56a2b3e60a5a + - 2fb4b86a-3178-49a0-8ccc-5911f06fd3db Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -91,7 +91,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -109,13 +109,13 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.0.0 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET uri: https://api.fabric.microsoft.com/v1/capacities response: body: string: '{"value": [{"id": "00000000-0000-0000-0000-000000000004", "displayName": - "mocked_fabriccli_capacity_name", "sku": "F16", "region": "West Europe", "state": + "mocked_fabriccli_capacity_name", "sku": "F2", "region": "Central US", "state": "Active"}]}' headers: Access-Control-Expose-Headers: @@ -125,15 +125,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '456' + - '271' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 17:14:30 GMT + - Thu, 13 Nov 2025 15:48:06 GMT Pragma: - no-cache RequestId: - - 64634728-2734-4efc-a384-d0bef88ca644 + - 1de4c3f3-eb80-46ef-96ac-12e0242c48f5 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -141,7 +141,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -162,12 +162,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.0.0 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: POST uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"id": "f8afce4d-5748-4f22-a741-863c80a4dabf", "displayName": "fabriccli_WorkspacePerTestclass_000001", + string: '{"id": "ed94014d-4890-4a8d-9d67-f562355b1831", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}' headers: Access-Control-Expose-Headers: @@ -177,17 +177,17 @@ interactions: Content-Encoding: - gzip Content-Length: - - '189' + - '188' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 17:14:38 GMT + - Thu, 13 Nov 2025 15:48:14 GMT Location: - - https://api.fabric.microsoft.com/v1/workspaces/f8afce4d-5748-4f22-a741-863c80a4dabf + - https://api.fabric.microsoft.com/v1/workspaces/ed94014d-4890-4a8d-9d67-f562355b1831 Pragma: - no-cache RequestId: - - 661df3ac-5cbb-43c8-907e-cf3d49a2afcc + - 89be6e83-d4dc-46df-a5b5-e9cf3b6df9a3 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -195,7 +195,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -213,13 +213,13 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.0.0 (acl rm; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (acl rm; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": - "My workspace", "description": "", "type": "Personal"}, {"id": "f8afce4d-5748-4f22-a741-863c80a4dabf", + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "ed94014d-4890-4a8d-9d67-f562355b1831", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' headers: @@ -230,15 +230,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '357' + - '1551' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 17:23:20 GMT + - Thu, 13 Nov 2025 15:48:19 GMT Pragma: - no-cache RequestId: - - 29d18d92-6232-4d33-a213-c70f92e79ff0 + - b9976c6a-ebde-4198-b1fe-3733b2b231b0 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -246,7 +246,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -264,9 +264,9 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.0.0 (acl rm; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (acl rm; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/f8afce4d-5748-4f22-a741-863c80a4dabf/items + uri: https://api.fabric.microsoft.com/v1/workspaces/ed94014d-4890-4a8d-9d67-f562355b1831/items response: body: string: '{"value": []}' @@ -282,11 +282,11 @@ interactions: Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 17:23:20 GMT + - Thu, 13 Nov 2025 15:48:20 GMT Pragma: - no-cache RequestId: - - badcd371-0a0d-4315-a796-8997915abd72 + - 639597c7-b14b-4412-ab3e-fbc607e1fe8d Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -294,7 +294,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -314,9 +314,9 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.0.0 (acl rm; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (acl rm; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: DELETE - uri: https://api.fabric.microsoft.com/v1/workspaces/f8afce4d-5748-4f22-a741-863c80a4dabf + uri: https://api.fabric.microsoft.com/v1/workspaces/ed94014d-4890-4a8d-9d67-f562355b1831 response: body: string: '' @@ -332,11 +332,11 @@ interactions: Content-Type: - application/octet-stream Date: - - Tue, 02 Sep 2025 17:23:20 GMT + - Thu, 13 Nov 2025 15:48:21 GMT Pragma: - no-cache RequestId: - - 8ac767dc-8ad9-4991-9e09-1e82bc9d654c + - 6193e80d-4820-4222-af68-dfa05ffd9545 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -344,7 +344,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: diff --git a/tests/test_commands/recordings/test_commands/test_acls/test_acls_ls_workspace_invalid_query_failure.yaml b/tests/test_commands/recordings/test_commands/test_acls/test_acls_ls_workspace_invalid_query_failure.yaml new file mode 100644 index 000000000..6a82de0d5 --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_acls/test_acls_ls_workspace_invalid_query_failure.yaml @@ -0,0 +1,104 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.1.0 + 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": "a2ed864b-19f6-4a29-8485-30de235cdde5", + "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: + - '876' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 21 Oct 2025 12:47:46 GMT + Pragma: + - no-cache + RequestId: + - 0298c780-2343-4e59-91a6-3d951900391e + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/a2ed864b-19f6-4a29-8485-30de235cdde5/roleAssignments + response: + body: + string: '{"value": [{"id": "00000000-0000-0000-0000-000000000001", "principal": + {"id": "00000000-0000-0000-0000-000000000001", "displayName": "MSIT Cycle", + "type": "User", "userDetails": {"userPrincipalName": "mocked@admin_test_user"}}, + "role": "Admin"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '186' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 21 Oct 2025 12:47:46 GMT + Pragma: + - no-cache + RequestId: + - a41e0ef0-e511-4cac-b72f-bdd2d4720487 + 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_cd/test_cd_workspace_with_special_characters_success['].yaml b/tests/test_commands/recordings/test_commands/test_acls/test_acls_ls_workspace_query_success.yaml similarity index 66% rename from tests/test_commands/recordings/test_commands/test_cd/test_cd_workspace_with_special_characters_success['].yaml rename to tests/test_commands/recordings/test_commands/test_acls/test_acls_ls_workspace_query_success.yaml index f575dffca..106b02e84 100644 --- a/tests/test_commands/recordings/test_commands/test_cd/test_cd_workspace_with_special_characters_success['].yaml +++ b/tests/test_commands/recordings/test_commands/test_acls/test_acls_ls_workspace_query_success.yaml @@ -11,13 +11,13 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.1.0 method: GET uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": - "My workspace", "description": "", "type": "Personal"}, {"id": "24e77cc9-b249-414d-a402-05915759c048", + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "ed94014d-4890-4a8d-9d67-f562355b1831", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' headers: @@ -28,15 +28,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '355' + - '1551' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:15:28 GMT + - Thu, 13 Nov 2025 15:48:14 GMT Pragma: - no-cache RequestId: - - effad112-8053-4f88-9bfa-3fab7956908d + - cf3fa485-0789-4292-b431-3ebc5939bd78 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -44,7 +44,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -62,15 +62,15 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.1.0 method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces + uri: https://api.fabric.microsoft.com/v1/workspaces/ed94014d-4890-4a8d-9d67-f562355b1831/roleAssignments response: body: - string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": - "My workspace", "description": "", "type": "Personal"}, {"id": "24e77cc9-b249-414d-a402-05915759c048", - "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created - by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + string: '{"value": [{"id": "00000000-0000-0000-0000-000000000001", "principal": + {"id": "00000000-0000-0000-0000-000000000001", "displayName": "MSIT Cycle", + "type": "User", "userDetails": {"userPrincipalName": "mocked@admin_test_user"}}, + "role": "Admin"}]}' headers: Access-Control-Expose-Headers: - RequestId @@ -79,15 +79,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '355' + - '186' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:15:28 GMT + - Thu, 13 Nov 2025 15:48:15 GMT Pragma: - no-cache RequestId: - - b072813c-b390-4d76-a1bf-f8af304ee605 + - 93a06e26-b5d6-403f-856a-59c4962b49d4 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -95,7 +95,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -113,14 +113,15 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.1.0 method: GET - uri: https://api.fabric.microsoft.com/v1/capacities + uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"value": [{"id": "00000000-0000-0000-0000-000000000004", "displayName": - "mocked_fabriccli_capacity_name", "sku": "F16", "region": "West Europe", "state": - "Active"}]}' + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "ed94014d-4890-4a8d-9d67-f562355b1831", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' headers: Access-Control-Expose-Headers: - RequestId @@ -129,15 +130,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '456' + - '1551' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:15:34 GMT + - Thu, 13 Nov 2025 15:48:15 GMT Pragma: - no-cache RequestId: - - 35c2fffc-d5cf-44f2-a465-7b08d2e3b66a + - 7a1cc3c8-dc06-4b77-92c2-da8660560194 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -145,15 +146,14 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: code: 200 message: OK - request: - body: '{"description": "Created by fab", "displayName": "fabcli000001''", "capacityId": - "00000000-0000-0000-0000-000000000004"}' + body: null headers: Accept: - '*/*' @@ -161,37 +161,35 @@ interactions: - gzip, deflate Connection: - keep-alive - Content-Length: - - '123' Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 - method: POST - uri: https://api.fabric.microsoft.com/v1/workspaces + - ms-fabric-cli-test/1.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed94014d-4890-4a8d-9d67-f562355b1831/roleAssignments response: body: - string: '{"id": "7892cd21-09e7-42ee-8c00-066f3aa33acd", "displayName": "fabcli000001''", - "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}' + string: '{"value": [{"id": "00000000-0000-0000-0000-000000000001", "principal": + {"id": "00000000-0000-0000-0000-000000000001", "displayName": "MSIT Cycle", + "type": "User", "userDetails": {"userPrincipalName": "mocked@admin_test_user"}}, + "role": "Admin"}]}' headers: Access-Control-Expose-Headers: - - RequestId,Location + - RequestId Cache-Control: - no-store, must-revalidate, no-cache Content-Encoding: - gzip Content-Length: - - '167' + - '186' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:15:42 GMT - Location: - - https://api.fabric.microsoft.com/v1/workspaces/7892cd21-09e7-42ee-8c00-066f3aa33acd + - Thu, 13 Nov 2025 15:48:16 GMT Pragma: - no-cache RequestId: - - 5e1ec86e-3edd-43a8-a1b4-f0f30b2ce2c5 + - 9d432456-d21b-43df-973d-8bdfe7628675 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -199,12 +197,12 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: - code: 201 - message: Created + code: 200 + message: OK - request: body: null headers: @@ -217,17 +215,15 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.1.0 method: GET uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": - "My workspace", "description": "", "type": "Personal"}, {"id": "24e77cc9-b249-414d-a402-05915759c048", + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "ed94014d-4890-4a8d-9d67-f562355b1831", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created - by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}, - {"id": "7892cd21-09e7-42ee-8c00-066f3aa33acd", "displayName": "fabcli000001''", - "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' headers: Access-Control-Expose-Headers: - RequestId @@ -236,15 +232,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '396' + - '1551' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:15:41 GMT + - Thu, 13 Nov 2025 15:48:17 GMT Pragma: - no-cache RequestId: - - 74317958-4629-4763-9b43-9c1e6e472e15 + - d07c2cf5-9037-4086-8824-de5612bef201 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -252,7 +248,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -270,17 +266,15 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.1.0 method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces + uri: https://api.fabric.microsoft.com/v1/workspaces/ed94014d-4890-4a8d-9d67-f562355b1831/roleAssignments response: body: - string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": - "My workspace", "description": "", "type": "Personal"}, {"id": "24e77cc9-b249-414d-a402-05915759c048", - "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created - by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}, - {"id": "7892cd21-09e7-42ee-8c00-066f3aa33acd", "displayName": "fabcli000001''", - "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + string: '{"value": [{"id": "00000000-0000-0000-0000-000000000001", "principal": + {"id": "00000000-0000-0000-0000-000000000001", "displayName": "MSIT Cycle", + "type": "User", "userDetails": {"userPrincipalName": "mocked@admin_test_user"}}, + "role": "Admin"}]}' headers: Access-Control-Expose-Headers: - RequestId @@ -289,15 +283,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '396' + - '186' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:15:41 GMT + - Thu, 13 Nov 2025 15:48:18 GMT Pragma: - no-cache RequestId: - - c5ac5fa2-b6f4-4dc8-8fff-46c22ee4234a + - 15d988b4-1684-44b3-9a9c-a3f6fa2fe8cd Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -305,7 +299,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -323,12 +317,15 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 + - ms-fabric-cli-test/1.1.0 method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/7892cd21-09e7-42ee-8c00-066f3aa33acd/items + uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"value": []}' + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "ed94014d-4890-4a8d-9d67-f562355b1831", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' headers: Access-Control-Expose-Headers: - RequestId @@ -337,15 +334,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '32' + - '1551' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:15:42 GMT + - Thu, 13 Nov 2025 15:48:18 GMT Pragma: - no-cache RequestId: - - b5b3c4a8-a945-447f-8f8c-e569c3bdcc26 + - 82f699c7-c31a-460d-89c5-aa75b54fb86d Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -353,7 +350,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -368,17 +365,18 @@ interactions: - gzip, deflate Connection: - keep-alive - Content-Length: - - '0' Content-Type: - application/json User-Agent: - - ms-fabric-cli-test/1.0.0 - method: DELETE - uri: https://api.fabric.microsoft.com/v1/workspaces/7892cd21-09e7-42ee-8c00-066f3aa33acd + - ms-fabric-cli-test/1.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed94014d-4890-4a8d-9d67-f562355b1831/roleAssignments response: body: - string: '' + string: '{"value": [{"id": "00000000-0000-0000-0000-000000000001", "principal": + {"id": "00000000-0000-0000-0000-000000000001", "displayName": "MSIT Cycle", + "type": "User", "userDetails": {"userPrincipalName": "mocked@admin_test_user"}}, + "role": "Admin"}]}' headers: Access-Control-Expose-Headers: - RequestId @@ -387,15 +385,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '0' + - '186' Content-Type: - - application/octet-stream + - application/json; charset=utf-8 Date: - - Tue, 02 Sep 2025 18:15:42 GMT + - Thu, 13 Nov 2025 15:48:19 GMT Pragma: - no-cache RequestId: - - 13382b0d-9928-4752-b212-8bf48bcab208 + - 70982aba-034f-4206-81d0-be3e3898ca30 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -403,7 +401,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: diff --git a/tests/test_commands/recordings/test_commands/test_ls/class_setup.yaml b/tests/test_commands/recordings/test_commands/test_ls/class_setup.yaml index 2ee1ff59d..d7e759d09 100644 --- a/tests/test_commands/recordings/test_commands/test_ls/class_setup.yaml +++ b/tests/test_commands/recordings/test_commands/test_ls/class_setup.yaml @@ -11,12 +11,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0.rc2 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": "My workspace", "description": "", "type": "Personal"}]}' headers: Access-Control-Expose-Headers: @@ -26,15 +26,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '532' + - '1517' Content-Type: - application/json; charset=utf-8 Date: - - Mon, 08 Sep 2025 17:12:58 GMT + - Sun, 16 Nov 2025 13:28:59 GMT Pragma: - no-cache RequestId: - - 7f127a60-1fb7-4d85-8973-05f00199f6f9 + - a1ca655d-adf4-4a7a-8d2c-2dc3ab03e53b Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -42,7 +42,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -60,12 +60,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0.rc2 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": "My workspace", "description": "", "type": "Personal"}]}' headers: Access-Control-Expose-Headers: @@ -75,15 +75,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '532' + - '1517' Content-Type: - application/json; charset=utf-8 Date: - - Mon, 08 Sep 2025 17:12:59 GMT + - Sun, 16 Nov 2025 13:29:00 GMT Pragma: - no-cache RequestId: - - 2093c916-4387-4b40-9569-4e062495a1cd + - 4fb405d9-466a-4e9d-81f3-a61091331c8a Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -91,7 +91,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -109,13 +109,13 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0.rc2 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET uri: https://api.fabric.microsoft.com/v1/capacities response: body: string: '{"value": [{"id": "00000000-0000-0000-0000-000000000004", "displayName": - "mocked_fabriccli_capacity_name", "sku": "F16", "region": "West Europe", "state": + "mocked_fabriccli_capacity_name", "sku": "F2", "region": "Central US", "state": "Active"}]}' headers: Access-Control-Expose-Headers: @@ -125,15 +125,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '456' + - '271' Content-Type: - application/json; charset=utf-8 Date: - - Mon, 08 Sep 2025 17:13:05 GMT + - Sun, 16 Nov 2025 13:29:05 GMT Pragma: - no-cache RequestId: - - 229a8530-3da6-4756-9466-9c0997ebe2ed + - 9a962d92-07ed-4680-97dc-c07909f25e22 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -141,7 +141,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -162,12 +162,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0.rc2 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: POST uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"id": "a32f2c4b-828b-4897-8b4b-9225c45db8d6", "displayName": "fabriccli_WorkspacePerTestclass_000001", + string: '{"id": "7b82ecee-ed54-4d87-84dd-07511c5f5ad2", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}' headers: Access-Control-Expose-Headers: @@ -181,13 +181,13 @@ interactions: Content-Type: - application/json; charset=utf-8 Date: - - Mon, 08 Sep 2025 17:13:13 GMT + - Sun, 16 Nov 2025 13:29:14 GMT Location: - - https://api.fabric.microsoft.com/v1/workspaces/a32f2c4b-828b-4897-8b4b-9225c45db8d6 + - https://api.fabric.microsoft.com/v1/workspaces/7b82ecee-ed54-4d87-84dd-07511c5f5ad2 Pragma: - no-cache RequestId: - - 79686ca9-aa8e-4631-8830-aa479be9728f + - a9920ffb-8339-43a8-8f5b-ab313cafb507 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -195,7 +195,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -213,13 +213,13 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0.rc2 (ls; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName": - "My workspace", "description": "", "type": "Personal"}, {"id": "a32f2c4b-828b-4897-8b4b-9225c45db8d6", + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "7b82ecee-ed54-4d87-84dd-07511c5f5ad2", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' headers: @@ -230,15 +230,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '567' + - '1551' Content-Type: - application/json; charset=utf-8 Date: - - Mon, 08 Sep 2025 17:28:37 GMT + - Sun, 16 Nov 2025 13:29:43 GMT Pragma: - no-cache RequestId: - - da469de8-6183-4237-bfda-5b75da322b84 + - 760e6315-8597-44fc-807f-62840e999e08 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -246,7 +246,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -264,12 +264,14 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0.rc2 (ls; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/a32f2c4b-828b-4897-8b4b-9225c45db8d6/items + uri: https://api.fabric.microsoft.com/v1/workspaces/7b82ecee-ed54-4d87-84dd-07511c5f5ad2/items response: body: - string: '{"value": []}' + string: '{"value": [{"id": "2d69f214-7721-41c3-a595-1ac4960a7215", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "7b82ecee-ed54-4d87-84dd-07511c5f5ad2"}]}' headers: Access-Control-Expose-Headers: - RequestId @@ -278,15 +280,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '32' + - '176' Content-Type: - application/json; charset=utf-8 Date: - - Mon, 08 Sep 2025 17:28:37 GMT + - Sun, 16 Nov 2025 13:29:44 GMT Pragma: - no-cache RequestId: - - 2049ae30-9354-497d-a192-ba82c62c0e0a + - 8f711d74-2ab1-4d92-9c00-f90f31843fe1 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -294,7 +296,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: @@ -314,9 +316,9 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0.rc2 (ls; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2) + - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: DELETE - uri: https://api.fabric.microsoft.com/v1/workspaces/a32f2c4b-828b-4897-8b4b-9225c45db8d6 + uri: https://api.fabric.microsoft.com/v1/workspaces/7b82ecee-ed54-4d87-84dd-07511c5f5ad2 response: body: string: '' @@ -332,11 +334,11 @@ interactions: Content-Type: - application/octet-stream Date: - - Mon, 08 Sep 2025 17:28:37 GMT + - Sun, 16 Nov 2025 13:29:45 GMT Pragma: - no-cache RequestId: - - 6d01263c-849d-4bff-a9db-f60cb1a67f0e + - 87dce47d-17c3-48d7-8046-89b2600e75b1 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -344,7 +346,7 @@ interactions: X-Frame-Options: - deny home-cluster-uri: - - https://wabi-west-europe-redirect.analysis.windows.net/ + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ request-redirected: - 'true' status: diff --git a/tests/test_commands/recordings/test_commands/test_ls/test_ls_query_filter_success.yaml b/tests/test_commands/recordings/test_commands/test_ls/test_ls_query_filter_success.yaml new file mode 100644 index 000000000..59944f92c --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_ls/test_ls_query_filter_success.yaml @@ -0,0 +1,2015 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.1.0 + 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": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8", + "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: + - '1550' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:19:54 GMT + Pragma: + - no-cache + RequestId: + - 0abc8d4c-fa1b-41a0-8ec3-e0e6aafc81da + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": []}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '32' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:19:55 GMT + Pragma: + - no-cache + RequestId: + - 5defcaf1-ab76-4e4e-9fb4-63f2d750d4d1 + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": []}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '32' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:19:55 GMT + Pragma: + - no-cache + RequestId: + - 12418026-86dd-490a-9773-8111bd9e63a3 + 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": + "Notebook", "folderId": null, "definition": {"parts": [{"path": "notebook-content.py", + "payload": "IyBGYWJyaWMgbm90ZWJvb2sgc291cmNlCgojIE1FVEFEQVRBICoqKioqKioqKioqKioqKioqKioqCgojIE1FVEEgewojIE1FVEEgICAia2VybmVsX2luZm8iOiB7CiMgTUVUQSAgICAgIm5hbWUiOiAic3luYXBzZV9weXNwYXJrIgojIE1FVEEgICB9LAojIE1FVEEgICAiZGVwZW5kZW5jaWVzIjoge30KIyBNRVRBIH0KCiMgQ0VMTCAqKioqKioqKioqKioqKioqKioqKgoKIyBXZWxjb21lIHRvIHlvdXIgbmV3IG5vdGVib29rCiMgVHlwZSBoZXJlIGluIHRoZSBjZWxsIGVkaXRvciB0byBhZGQgY29kZSEKCgojIE1FVEFEQVRBICoqKioqKioqKioqKioqKioqKioqCgojIE1FVEEgewojIE1FVEEgICAibGFuZ3VhZ2UiOiAicHl0aG9uIiwKIyBNRVRBICAgImxhbmd1YWdlX2dyb3VwIjogInN5bmFwc2VfcHlzcGFyayIKIyBNRVRBIH0K", + "payloadType": "InlineBase64"}]}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '764' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.1.0 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/notebooks + 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: + - Sun, 16 Nov 2025 13:19:57 GMT + ETag: + - '""' + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a567e996-8fb8-4168-8ab0-e5a14ab74f28 + Pragma: + - no-cache + RequestId: + - 0af53299-ddd9-4f5e-985d-ee753df4e997 + 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: + - a567e996-8fb8-4168-8ab0-e5a14ab74f28 + 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.1.0 + method: GET + uri: https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a567e996-8fb8-4168-8ab0-e5a14ab74f28 + response: + body: + string: '{"status": "Succeeded", "createdTimeUtc": "2025-11-16T13:19:56.9594623", + "lastUpdatedTimeUtc": "2025-11-16T13:19:58.7569553", "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: + - '132' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:20:18 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a567e996-8fb8-4168-8ab0-e5a14ab74f28/result + Pragma: + - no-cache + RequestId: + - 3f53ac41-1b00-49bf-b95c-69e64f75596d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a567e996-8fb8-4168-8ab0-e5a14ab74f28 + 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.1.0 + method: GET + uri: https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a567e996-8fb8-4168-8ab0-e5a14ab74f28/result + response: + body: + string: '{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Sun, 16 Nov 2025 13:20:18 GMT + Pragma: + - no-cache + RequestId: + - 57cb6894-765b-4538-bd06-90420594a533 + 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.1.0 + 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": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8", + "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: + - '1550' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:20:20 GMT + Pragma: + - no-cache + RequestId: + - 85b20de3-3922-4c6a-8c5e-5ebcc8fcd4b5 + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '177' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:20:21 GMT + Pragma: + - no-cache + RequestId: + - 55850d30-aaa1-43d5-8a94-a9386362247c + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '177' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:20:22 GMT + Pragma: + - no-cache + RequestId: + - 41791941-8cc0-4680-be83-1221c5402106 + 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": "fabcli000002", "type": + "Notebook", "folderId": null, "definition": {"parts": [{"path": "notebook-content.py", + "payload": "IyBGYWJyaWMgbm90ZWJvb2sgc291cmNlCgojIE1FVEFEQVRBICoqKioqKioqKioqKioqKioqKioqCgojIE1FVEEgewojIE1FVEEgICAia2VybmVsX2luZm8iOiB7CiMgTUVUQSAgICAgIm5hbWUiOiAic3luYXBzZV9weXNwYXJrIgojIE1FVEEgICB9LAojIE1FVEEgICAiZGVwZW5kZW5jaWVzIjoge30KIyBNRVRBIH0KCiMgQ0VMTCAqKioqKioqKioqKioqKioqKioqKgoKIyBXZWxjb21lIHRvIHlvdXIgbmV3IG5vdGVib29rCiMgVHlwZSBoZXJlIGluIHRoZSBjZWxsIGVkaXRvciB0byBhZGQgY29kZSEKCgojIE1FVEFEQVRBICoqKioqKioqKioqKioqKioqKioqCgojIE1FVEEgewojIE1FVEEgICAibGFuZ3VhZ2UiOiAicHl0aG9uIiwKIyBNRVRBICAgImxhbmd1YWdlX2dyb3VwIjogInN5bmFwc2VfcHlzcGFyayIKIyBNRVRBIH0K", + "payloadType": "InlineBase64"}]}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '764' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.1.0 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/notebooks + 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: + - Sun, 16 Nov 2025 13:20:24 GMT + ETag: + - '""' + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/b35182ef-b61e-43c7-92bd-23c040622cb7 + Pragma: + - no-cache + RequestId: + - 67e3afd4-41bb-4a76-8f44-a98be4b604cd + 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: + - b35182ef-b61e-43c7-92bd-23c040622cb7 + 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.1.0 + method: GET + uri: https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/b35182ef-b61e-43c7-92bd-23c040622cb7 + response: + body: + string: '{"status": "Succeeded", "createdTimeUtc": "2025-11-16T13:20:23.2424981", + "lastUpdatedTimeUtc": "2025-11-16T13:20:24.6956305", "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: + - '131' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:20:44 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/b35182ef-b61e-43c7-92bd-23c040622cb7/result + Pragma: + - no-cache + RequestId: + - 8b59930f-17ce-4460-b7eb-36ca259b241d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - b35182ef-b61e-43c7-92bd-23c040622cb7 + 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.1.0 + method: GET + uri: https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/b35182ef-b61e-43c7-92bd-23c040622cb7/result + response: + body: + string: '{"id": "40799607-60be-4ce1-90c3-59b814d5df50", "type": "Notebook", + "displayName": "fabcli000002", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Sun, 16 Nov 2025 13:20:45 GMT + Pragma: + - no-cache + RequestId: + - 04f2cfb3-3767-4784-aecc-55f021869a97 + 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.1.0 + 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": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8", + "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: + - '1550' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:20:45 GMT + Pragma: + - no-cache + RequestId: + - 992a614c-ee3d-438d-bb91-1dcddab3ee7d + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "40799607-60be-4ce1-90c3-59b814d5df50", + "type": "Notebook", "displayName": "fabcli000002", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '219' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:20:47 GMT + Pragma: + - no-cache + RequestId: + - 7fe7b045-94df-4312-892d-fa0d02a79d57 + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "40799607-60be-4ce1-90c3-59b814d5df50", + "type": "Notebook", "displayName": "fabcli000002", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '219' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:20:47 GMT + Pragma: + - no-cache + RequestId: + - 766e20e9-3387-41a6-8e91-bf5402256f72 + 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": "fabcli000003", "type": + "Notebook", "folderId": null, "definition": {"parts": [{"path": "notebook-content.py", + "payload": "IyBGYWJyaWMgbm90ZWJvb2sgc291cmNlCgojIE1FVEFEQVRBICoqKioqKioqKioqKioqKioqKioqCgojIE1FVEEgewojIE1FVEEgICAia2VybmVsX2luZm8iOiB7CiMgTUVUQSAgICAgIm5hbWUiOiAic3luYXBzZV9weXNwYXJrIgojIE1FVEEgICB9LAojIE1FVEEgICAiZGVwZW5kZW5jaWVzIjoge30KIyBNRVRBIH0KCiMgQ0VMTCAqKioqKioqKioqKioqKioqKioqKgoKIyBXZWxjb21lIHRvIHlvdXIgbmV3IG5vdGVib29rCiMgVHlwZSBoZXJlIGluIHRoZSBjZWxsIGVkaXRvciB0byBhZGQgY29kZSEKCgojIE1FVEFEQVRBICoqKioqKioqKioqKioqKioqKioqCgojIE1FVEEgewojIE1FVEEgICAibGFuZ3VhZ2UiOiAicHl0aG9uIiwKIyBNRVRBICAgImxhbmd1YWdlX2dyb3VwIjogInN5bmFwc2VfcHlzcGFyayIKIyBNRVRBIH0K", + "payloadType": "InlineBase64"}]}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '764' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.1.0 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/notebooks + 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: + - Sun, 16 Nov 2025 13:20:49 GMT + ETag: + - '""' + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/45fb87d8-b283-4608-a855-84aebae58766 + Pragma: + - no-cache + RequestId: + - 74de2beb-1cd1-4e01-a4df-647be99660a3 + 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: + - 45fb87d8-b283-4608-a855-84aebae58766 + 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.1.0 + method: GET + uri: https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/45fb87d8-b283-4608-a855-84aebae58766 + response: + body: + string: '{"status": "Succeeded", "createdTimeUtc": "2025-11-16T13:20:49.2966387", + "lastUpdatedTimeUtc": "2025-11-16T13:20:51.0154785", "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: + - '132' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:11 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/45fb87d8-b283-4608-a855-84aebae58766/result + Pragma: + - no-cache + RequestId: + - 6994d4f5-bda2-42f3-8a0d-dd556952d392 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - 45fb87d8-b283-4608-a855-84aebae58766 + 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.1.0 + method: GET + uri: https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/45fb87d8-b283-4608-a855-84aebae58766/result + response: + body: + string: '{"id": "26d99077-e840-4090-9a8c-d262d72db47f", "type": "Notebook", + "displayName": "fabcli000003", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Sun, 16 Nov 2025 13:21:12 GMT + Pragma: + - no-cache + RequestId: + - 6ee5d7a6-3c24-46cf-a31b-3c1cecaedef0 + 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.1.0 + 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": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8", + "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: + - '1550' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:12 GMT + Pragma: + - no-cache + RequestId: + - 95df533f-175a-4a93-8e94-6f7c3bd15708 + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "40799607-60be-4ce1-90c3-59b814d5df50", + "type": "Notebook", "displayName": "fabcli000002", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "26d99077-e840-4090-9a8c-d262d72db47f", + "type": "Notebook", "displayName": "fabcli000003", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '254' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:12 GMT + Pragma: + - no-cache + RequestId: + - a13f71b3-c66e-4728-bdff-06ac8285a5d0 + 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.1.0 + 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": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8", + "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: + - '1550' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:13 GMT + Pragma: + - no-cache + RequestId: + - 12d78cf4-9e68-4ffc-bb95-83116a9b8558 + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "40799607-60be-4ce1-90c3-59b814d5df50", + "type": "Notebook", "displayName": "fabcli000002", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "26d99077-e840-4090-9a8c-d262d72db47f", + "type": "Notebook", "displayName": "fabcli000003", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '254' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:14 GMT + Pragma: + - no-cache + RequestId: + - 93cceedb-24a3-4f8e-96f8-00f25dada57e + 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.1.0 + 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": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8", + "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: + - '1550' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:14 GMT + Pragma: + - no-cache + RequestId: + - 49b55029-eb9f-453b-9b94-53f7bf1534ff + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "40799607-60be-4ce1-90c3-59b814d5df50", + "type": "Notebook", "displayName": "fabcli000002", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "26d99077-e840-4090-9a8c-d262d72db47f", + "type": "Notebook", "displayName": "fabcli000003", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '254' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:14 GMT + Pragma: + - no-cache + RequestId: + - 47702f80-196f-477f-b9f5-12fcbea0c4b2 + 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.1.0 + 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": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8", + "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: + - '1550' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:15 GMT + Pragma: + - no-cache + RequestId: + - 5b274ea4-3f40-4824-8b45-a21a3d056b38 + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "40799607-60be-4ce1-90c3-59b814d5df50", + "type": "Notebook", "displayName": "fabcli000002", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "26d99077-e840-4090-9a8c-d262d72db47f", + "type": "Notebook", "displayName": "fabcli000003", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '254' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:16 GMT + Pragma: + - no-cache + RequestId: + - 639aa36a-f9c2-4db3-812e-32b89c6f227d + 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.1.0 + 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": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8", + "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: + - '1550' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:15 GMT + Pragma: + - no-cache + RequestId: + - 2eac2013-1cbf-4ec7-a801-076c497516d2 + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "40799607-60be-4ce1-90c3-59b814d5df50", + "type": "Notebook", "displayName": "fabcli000002", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "26d99077-e840-4090-9a8c-d262d72db47f", + "type": "Notebook", "displayName": "fabcli000003", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '254' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:16 GMT + Pragma: + - no-cache + RequestId: + - 9ccd4d16-ff6a-424c-8f76-f6a404d61881 + 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.1.0 + 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": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8", + "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: + - '1550' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:17 GMT + Pragma: + - no-cache + RequestId: + - bd8b8ca6-660c-4311-a4c8-f7aa229c77c0 + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "40799607-60be-4ce1-90c3-59b814d5df50", + "type": "Notebook", "displayName": "fabcli000002", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "26d99077-e840-4090-9a8c-d262d72db47f", + "type": "Notebook", "displayName": "fabcli000003", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '254' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:18 GMT + Pragma: + - no-cache + RequestId: + - 00662d9a-c4bd-44e2-80fe-b11046f87a78 + 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.1.0 + 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": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8", + "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: + - '1550' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:19 GMT + Pragma: + - no-cache + RequestId: + - 2ae77d84-f95f-45b1-a2aa-9ebcbfba08a9 + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "40799607-60be-4ce1-90c3-59b814d5df50", + "type": "Notebook", "displayName": "fabcli000002", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "26d99077-e840-4090-9a8c-d262d72db47f", + "type": "Notebook", "displayName": "fabcli000003", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '254' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:19 GMT + Pragma: + - no-cache + RequestId: + - d1da46d7-8834-4532-95ad-f78fe7c7fe37 + 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.1.0 + method: DELETE + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items/26d99077-e840-4090-9a8c-d262d72db47f + 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: + - Sun, 16 Nov 2025 13:21:20 GMT + Pragma: + - no-cache + RequestId: + - 09e9060a-c89a-4091-93fb-9cf7ca477bc5 + 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.1.0 + 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": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8", + "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: + - '1550' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:20 GMT + Pragma: + - no-cache + RequestId: + - f55b2f7d-8b02-4735-b169-eaadc9454b15 + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}, {"id": "40799607-60be-4ce1-90c3-59b814d5df50", + "type": "Notebook", "displayName": "fabcli000002", "description": "Created + by fab", "workspaceId": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '219' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:21 GMT + Pragma: + - no-cache + RequestId: + - 08cfd128-3cc4-4ae7-8c45-792936c69f62 + 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.1.0 + method: DELETE + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items/40799607-60be-4ce1-90c3-59b814d5df50 + 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: + - Sun, 16 Nov 2025 13:21:21 GMT + Pragma: + - no-cache + RequestId: + - 4fe471df-057d-4e63-b730-630e04ffc707 + 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.1.0 + 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": "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8", + "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: + - '1550' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:22 GMT + Pragma: + - no-cache + RequestId: + - 0dc91184-470c-48ef-a4ad-ea84035226fb + 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.1.0 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items + response: + body: + string: '{"value": [{"id": "8114b4a7-c0cb-4d32-bd9f-2504b274a1ae", "type": "Notebook", + "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": + "ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '177' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 16 Nov 2025 13:21:22 GMT + Pragma: + - no-cache + RequestId: + - 68192376-2e76-4b84-a43b-b9fdf0483b51 + 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.1.0 + method: DELETE + uri: https://api.fabric.microsoft.com/v1/workspaces/ed5c4a0c-ac1d-4865-8ab7-9e42c538e0a8/items/8114b4a7-c0cb-4d32-bd9f-2504b274a1ae + 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: + - Sun, 16 Nov 2025 13:21:22 GMT + Pragma: + - no-cache + RequestId: + - e7d406a4-bff5-45e9-b424-fdeca76b5ea3 + 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_acls.py b/tests/test_commands/test_acls.py index 45d27f1d1..ac72e4fce 100644 --- a/tests/test_commands/test_acls.py +++ b/tests/test_commands/test_acls.py @@ -261,6 +261,40 @@ def test_acls_ls_workspace_success( # Clean up _cleanup_acl(cli_executor, workspace.full_path, spn_id) + def test_acls_ls_workspace_query_success( + self, + workspace, + mock_questionary_print, + cli_executor: CLIExecutor, + test_data: StaticTestData, + ): + + # Test 1: Array projection for single field + cli_executor.exec_command(f"acl ls {workspace.full_path} -q [*].identity") + mock_questionary_print.assert_called() + assert any(test_data.admin.upn in call.args[0] for call in mock_questionary_print.mock_calls) + + mock_questionary_print.reset_mock() + + # Test 2: Multiple fields using array syntax + cli_executor.exec_command(f"acl ls {workspace.full_path} -q [].[identity,type]") + mock_questionary_print.assert_called() + call_args = mock_questionary_print.mock_calls[0].args[0] + assert test_data.admin.upn in call_args and "User" in call_args + + mock_questionary_print.reset_mock() + + # Test 3: Object projection with field aliases + cli_executor.exec_command( + f"acl ls {workspace.full_path} -q '[].{{principalInfo: identity, accessLevel: acl}}'" + ) + mock_questionary_print.assert_called() + call_args = mock_questionary_print.mock_calls[0].args[0] + assert "principalInfo" in call_args and "accessLevel" in call_args + + # Cleanup test ACL entry + _cleanup_acl(cli_executor, workspace.full_path, test_data.service_principal.id) + def test_acls_ls_workspace_long_success( self, workspace, diff --git a/tests/test_commands/test_api.py b/tests/test_commands/test_api.py index abb89240b..708d7517d 100644 --- a/tests/test_commands/test_api.py +++ b/tests/test_commands/test_api.py @@ -56,7 +56,7 @@ def test_api_add_workspace_role_assignment_show_headers_success( # Execute command cli_executor.exec_command( - f"api workspaces/{workspace_id}/roleAssignments --method post --input {input} --show_headers" + f"api workspaces/{workspace_id}/roleAssignments --method post --input '{input}' --show_headers" ) # Assert diff --git a/tests/test_commands/test_cd.py b/tests/test_commands/test_cd.py index bfbded187..ac4794b85 100644 --- a/tests/test_commands/test_cd.py +++ b/tests/test_commands/test_cd.py @@ -53,7 +53,7 @@ def test_cd_workspace_success(self, workspace, mock_print_done, cli_executor): "]", ";", # ":", need to fix tests in Windows - "'", + # "\\'", need to fix tests #'"', need to fix tests in Windows # "<", need to fix tests in Windows # ">", need to fix tests in Windows diff --git a/tests/test_commands/test_cp.py b/tests/test_commands/test_cp.py index aa63f8761..5e4ce6d41 100644 --- a/tests/test_commands/test_cp.py +++ b/tests/test_commands/test_cp.py @@ -1035,15 +1035,15 @@ def test_cp_item_existing_name_different_location_with_block_on_path_collision_f # region Helper Methods -def ls(path, long=False, all=False): - args = _build_ls_args(path, long, all) +def ls(path, long=False, all=False, query=None): + args = _build_ls_args(path, long, all, query) context = handle_context.get_command_context(args.path) fab_ls.exec_command(args, context) -def _build_ls_args(path, long, all): +def _build_ls_args(path, long, all, query): return argparse.Namespace( - command="ls", command_path="ls", path=path, long=long, all=all + command="ls", command_path="ls", path=path, long=long, all=all, query=query ) diff --git a/tests/test_commands/test_jobs.py b/tests/test_commands/test_jobs.py index 952d07724..b339fdb11 100644 --- a/tests/test_commands/test_jobs.py +++ b/tests/test_commands/test_jobs.py @@ -5,8 +5,8 @@ import json import os import re -import time import shutil +import time from unittest.mock import patch import pytest @@ -15,10 +15,10 @@ import fabric_cli.commands.jobs.fab_jobs_run as fab_jobs_run import fabric_cli.commands.jobs.fab_jobs_run_cancel as fab_jobs_run_cancel import fabric_cli.commands.jobs.fab_jobs_run_list as fab_jobs_run_list +import fabric_cli.commands.jobs.fab_jobs_run_rm as fab_jobs_run_rm import fabric_cli.commands.jobs.fab_jobs_run_sch as fab_jobs_run_sch import fabric_cli.commands.jobs.fab_jobs_run_status as fab_jobs_run_status import fabric_cli.commands.jobs.fab_jobs_run_update as fab_jobs_run_update -import fabric_cli.commands.jobs.fab_jobs_run_rm as fab_jobs_run_rm import fabric_cli.core.fab_state_config as state_config import fabric_cli.utils.fab_cmd_job_utils as utils_job from fabric_cli.core import fab_constant as constant @@ -27,6 +27,7 @@ from fabric_cli.core.hiearchy.fab_item import Item from fabric_cli.utils import fab_storage as utils_storage + class TestJobs: # region JOB RUN def test_run_job_notebook(self, item_factory, cli_executor, mock_questionary_print): @@ -259,7 +260,9 @@ def test_run_sch_notebook(self, item_factory, cli_executor, mock_questionary_pri input_config = "{'enabled': true, 'configuration': " + config + "}" # Execute command - cli_executor.exec_command(f"job run-sch {notebook.full_path} -i {input_config}") + cli_executor.exec_command( + f'job run-sch {notebook.full_path} -i "{input_config}"' + ) time.sleep(2) job_run_list(notebook.full_path, schedule=True) @@ -315,7 +318,7 @@ def test_run_schedule_notebook_wrong_params_failure( # Execute command cli_executor.exec_command( - f"job run-sch {notebook.full_path} --type weekly -i {input_config}" + f'job run-sch {notebook.full_path} --type weekly -i "{input_config}"' ) # Assert @@ -406,7 +409,7 @@ def test_run_schedule_update_notebook_wrong_params_failure( config = "{'type': 'Cron', 'startDateTime': '2024-04-28T00:00:00', 'endDateTime': '2024-04-30T23:59:00', 'localTimeZoneId': 'Central Standard Time', 'interval': 10}" input_config = "{'enabled': true, 'configuration': " + config + "}" cli_executor.exec_command( - f"job run-update {notebook.full_path} --id {schedule_id} --type weekly -i {input_config}" + f'job run-update {notebook.full_path} --id {schedule_id} --type weekly -i "{input_config}"' ) # Assert @@ -597,7 +600,7 @@ def test_run_param_job(self, item_factory, cli_executor, mock_questionary_print, # Execute command cli_executor.exec_command( - f"job run {notebook.full_path} --params {','.join(_params)}" + f"job run {notebook.full_path} --params '{','.join(_params)}'" ) # Assert @@ -643,7 +646,7 @@ def test_run_param_job(self, item_factory, cli_executor, mock_questionary_print, # Execute command cli_executor.exec_command( - f"job run {pipeline.full_path} --params {','.join(_params)}" + f"job run {pipeline.full_path} --params '{','.join(_params)}'" ) # Assert @@ -686,7 +689,7 @@ def test_run_invalid_param_types_failure( # Execute command cli_executor.exec_command( - f"job run {notebook.full_path} --params {','.join(_params)}" + f"job run {notebook.full_path} --params '{','.join(_params)}'" ) # Assert @@ -699,7 +702,7 @@ def test_run_invalid_param_types_failure( _params = ["int_param:int=string_value"] mock_fab_ui_print_error.reset_mock() cli_executor.exec_command( - f"job run {notebook.full_path} --params {','.join(_params)}" + f"job run {notebook.full_path} --params '{','.join(_params)}'" ) # Assert @@ -737,7 +740,7 @@ def test_run_invalid_param_types_failure( _params = ["string_param:string=new_value", "wrong_param:nonvalid=10"] mock_fab_ui_print_error.reset_mock() cli_executor.exec_command( - f"job run {pipeline.full_path} --params {','.join(_params)}" + f"job run {pipeline.full_path} --params '{','.join(_params)}'" ) # Assert @@ -751,7 +754,7 @@ def test_run_invalid_param_types_failure( _params = ['obj_param:object={"key":{"key":2},"key":"value"'] mock_fab_ui_print_error.reset_mock() cli_executor.exec_command( - f"job run {pipeline.full_path} --params {','.join(_params)}" + f"job run {pipeline.full_path} --params '{','.join(_params)}'" ) # Assert @@ -798,7 +801,7 @@ def test_run_table_maintenance( # Execute command cli_executor.exec_command( - f"job run {notebook.full_path} --config {json.dumps(conf)} --params string_param:string=new_value" + f"job run {notebook.full_path} --config '{json.dumps(conf)}' --params string_param:string=new_value" ) # Extract the arguments passed to the mock @@ -843,7 +846,7 @@ def test_run_schedule_rm_invalid_param_types_failure( constant.ERROR_NOT_FOUND, "The requested resource could not be found", ) - + # Test bad item path cli_executor.exec_command(f"job run-rm /bad_path/ --id 00000000-0000-0000-0000-000000000000 --force") @@ -852,7 +855,6 @@ def test_run_schedule_rm_invalid_param_types_failure( "The requested resource could not be found", ) - @pytest.mark.parametrize("item_type", [(ItemType.NOTEBOOK), (ItemType.DATA_PIPELINE), @@ -869,7 +871,9 @@ def test_run_schedule_rm_success(self, cli_executor, item_factory, mock_question config = "{'type': 'Cron', 'startDateTime': '2024-01-23T00:00:00', 'endDateTime': '2024-10-07T23:59:00', 'localTimeZoneId': 'Central Standard Time', 'interval': 10}" input_config = "{'enabled': true, 'configuration': " + config + "}" - cli_executor.exec_command(f"job run-sch {fabric_item.full_path} -i {input_config}") + cli_executor.exec_command( + f'job run-sch {fabric_item.full_path} -i "{input_config}"' + ) time.sleep(2) job_run_list(fabric_item.full_path, schedule=True) @@ -895,7 +899,9 @@ def test_run_schedule_rm_without_force_success(self, cli_executor, item_factory, config = "{'type': 'Cron', 'startDateTime': '2024-01-23T00:00:00', 'endDateTime': '2024-10-07T23:59:00', 'localTimeZoneId': 'Central Standard Time', 'interval': 10}" input_config = "{'enabled': true, 'configuration': " + config + "}" - cli_executor.exec_command(f"job run-sch {fabric_item.full_path} -i {input_config}") + cli_executor.exec_command( + f'job run-sch {fabric_item.full_path} -i "{input_config}"' + ) time.sleep(2) job_run_list(fabric_item.full_path, schedule=True) @@ -906,7 +912,7 @@ def test_run_schedule_rm_without_force_success(self, cli_executor, item_factory, # Ask confirmation mock_questionary_confirm.assert_called() - + # Check confirmation message assert mock_print_warning.call_args_list[0][0][0] == f"You are about to delete schedule '{scheduled_id}' from '{fabric_item.name}'. This action cannot be undone." @@ -927,7 +933,9 @@ def test_run_schedule_rm_without_force_cancel_operation_success(self, cli_execut config = "{'type': 'Cron', 'startDateTime': '2024-01-23T00:00:00', 'endDateTime': '2024-10-07T23:59:00', 'localTimeZoneId': 'Central Standard Time', 'interval': 10}" input_config = "{'enabled': true, 'configuration': " + config + "}" - cli_executor.exec_command(f"job run-sch {fabric_item.full_path} -i {input_config}") + cli_executor.exec_command( + f'job run-sch {fabric_item.full_path} -i "{input_config}"' + ) time.sleep(2) job_run_list(fabric_item.full_path, schedule=True) diff --git a/tests/test_commands/test_ln.py b/tests/test_commands/test_ln.py index 896b6f938..1e4007189 100644 --- a/tests/test_commands/test_ln.py +++ b/tests/test_commands/test_ln.py @@ -64,7 +64,7 @@ def test_ln_onelake_input_success( # Act cli_executor.exec_command( - f"ln {shortcut_path} --type oneLake --input {input} --force" + f"ln {shortcut_path} --type oneLake --input '{input}' --force" ) # Assert diff --git a/tests/test_commands/test_ls.py b/tests/test_commands/test_ls.py index e96e0225b..dd9819c49 100644 --- a/tests/test_commands/test_ls.py +++ b/tests/test_commands/test_ls.py @@ -9,12 +9,14 @@ import fabric_cli.core.fab_state_config as state_config from fabric_cli.core import fab_constant +from fabric_cli.core.fab_exceptions import FabricCLIError from fabric_cli.core.fab_output import OutputStatus from fabric_cli.core.fab_types import ( ItemType, VirtualItemContainerType, VirtualWorkspaceType, ) +from fabric_cli.errors import ErrorMessages from tests.test_commands.commands_parser import CLIExecutor from tests.test_commands.data.static_test_data import StaticTestData from tests.test_commands.utils import cli_path_join @@ -190,6 +192,94 @@ def test_ls_workspace_items_success( self._virtual_workspace_items, True, mock_questionary_print.mock_calls ) + def test_ls_query_filter_success( + self, + workspace, + item_factory, + mock_questionary_print, + assert_fabric_cli_error, + cli_executor: CLIExecutor, + ): + # Setup items with different names and types + notebook1 = item_factory(ItemType.NOTEBOOK) + notebook2 = item_factory(ItemType.NOTEBOOK) + notebook3 = item_factory(ItemType.NOTEBOOK) + + # Test 1: Basic JMESPath syntax + cli_executor.exec_command(f'ls {workspace.full_path} -q [].name') + mock_questionary_print.assert_called() + _assert_strings_in_mock_calls( + [notebook1.display_name, notebook2.display_name, notebook3.display_name], + True, + mock_questionary_print.mock_calls, + ) + + mock_questionary_print.reset_mock() + + # Test 2: JMESPath object syntax + cli_executor.exec_command( + f"ls {workspace.full_path} -l -q '[].{{displayName: name, itemID: id}}'" + ) + mock_questionary_print.assert_called() + _assert_strings_in_mock_calls( + [notebook1.display_name, notebook2.display_name, notebook3.display_name], + True, + mock_questionary_print.mock_calls, + ) + # Verify renamed fields + _assert_strings_in_mock_calls( + ["displayName", "itemID"], + True, + mock_questionary_print.mock_calls, + require_all_in_same_args=True + ) + + mock_questionary_print.reset_mock() + + # Test 3: JMESPath list syntax - here there are not keys so will be printed as list of arrays + cli_executor.exec_command(f'ls {workspace.full_path} -q [].[name]') + _assert_strings_in_mock_calls( + [f"['{notebook1.name}']", f"['{notebook2.name}']", f"['{notebook3.name}']"], + True, + mock_questionary_print.mock_calls, + ) + + mock_questionary_print.reset_mock() + + # Test 4: JMESPath object syntax without -l should not have id in the result + cli_executor.exec_command(f'ls {workspace.full_path} -q "[].{{displayName: name, itemId: id}}"') + mock_questionary_print.assert_called() + _assert_strings_in_mock_calls( + [f'{notebook1.name} None', f'{notebook2.name} None', f'{notebook3.name} None'], + True, + mock_questionary_print.mock_calls, + ) + + mock_questionary_print.reset_mock() + + # Test 5: JMESPath query filters specific value + cli_executor.exec_command( + f"ls {workspace.full_path} -q \"[?name=='{notebook1.name}'].name\"" + ) + mock_questionary_print.assert_called() + _assert_strings_in_mock_calls( + [f'{notebook1.name}'], + True, + mock_questionary_print.mock_calls, + ) + + _assert_strings_in_mock_calls( + [f'{notebook2.name}', f'{notebook3.name}'], + False, + mock_questionary_print.mock_calls, + ) + + mock_questionary_print.reset_mock() + + # Test 6: Invalid query format + cli_executor.exec_command(f'ls {workspace.full_path} -q "name type"') + assert_fabric_cli_error(fab_constant.ERROR_INVALID_INPUT, ErrorMessages.Common.invalid_jmespath_query()) + def test_ls_item_show_hidden_from_config_success( self, item_factory, diff --git a/tests/test_commands/test_mkdir.py b/tests/test_commands/test_mkdir.py index 916c66ac3..b6bcf6906 100644 --- a/tests/test_commands/test_mkdir.py +++ b/tests/test_commands/test_mkdir.py @@ -1309,7 +1309,7 @@ def test_mkdir_connection_with_onpremises_gateway_params_success( # Execute command with gateway and OnPremisesGateway connectivity type cli_executor.exec_command( - f"mkdir {connection_full_path} -P gatewayId={test_data.onpremises_gateway_details.id},connectionDetails.type=SQL,connectivityType=OnPremisesGateway,connectionDetails.parameters.server={test_data.sql_server.server}.database.windows.net,connectionDetails.parameters.database={test_data.sql_server.database},credentialDetails.type=Basic,credentialDetails.values=[{{\"gatewayId\":\"{test_data.onpremises_gateway_details.id}\",\"encryptedCredentials\":\"{test_data.onpremises_gateway_details.encrypted_credentials}\"}}]" + f'mkdir {connection_full_path} -P gatewayId={test_data.onpremises_gateway_details.id},connectionDetails.type=SQL,connectivityType=OnPremisesGateway,connectionDetails.parameters.server={test_data.sql_server.server}.database.windows.net,connectionDetails.parameters.database={test_data.sql_server.database},credentialDetails.type=Basic,credentialDetails.values=\'[{{"gatewayId":"{test_data.onpremises_gateway_details.id}","encryptedCredentials":"{test_data.onpremises_gateway_details.encrypted_credentials}"}}]\'' ) # Assert @@ -1318,7 +1318,7 @@ def test_mkdir_connection_with_onpremises_gateway_params_success( assert f"'{connection_display_name}.Connection' created" == mock_print_done.call_args[0][0] mock_print_done.reset_mock() - + # Cleanup rm(connection_full_path) @@ -1338,7 +1338,7 @@ def test_mkdir_connection_with_onpremises_gateway_params_ignore_params_success( ) cli_executor.exec_command( - f"mkdir {connection_full_path} -P gatewayId={test_data.onpremises_gateway_details.id},connectionDetails.type=SQL,connectivityType=OnPremisesGateway,connectionDetails.parameters.server={test_data.sql_server.server}.database.windows.net,connectionDetails.parameters.database={test_data.sql_server.database},credentialDetails.type=Basic,credentialDetails.values=[{{\"gatewayId\":\"{test_data.onpremises_gateway_details.id}\",\"encryptedCredentials\":\"{test_data.onpremises_gateway_details.encrypted_credentials}\",\"ignoreParameters\":\"ignoreParameters\"}}]" + f'mkdir {connection_full_path} -P gatewayId={test_data.onpremises_gateway_details.id},connectionDetails.type=SQL,connectivityType=OnPremisesGateway,connectionDetails.parameters.server={test_data.sql_server.server}.database.windows.net,connectionDetails.parameters.database={test_data.sql_server.database},credentialDetails.type=Basic,credentialDetails.values=\'[{{"gatewayId":"{test_data.onpremises_gateway_details.id}","encryptedCredentials":"{test_data.onpremises_gateway_details.encrypted_credentials}","ignoreParameters":"ignoreParameters"}}]\'' ) # Assert @@ -1353,7 +1353,6 @@ def test_mkdir_connection_with_onpremises_gateway_params_ignore_params_success( # Cleanup rm(connection_full_path) - def test_mkdir_connection_with_onpremises_gateway_params_failure( self, cli_executor, @@ -1383,7 +1382,7 @@ def test_mkdir_connection_with_onpremises_gateway_params_failure( # Test 2: Execute command with missing encryptedCredentials params cli_executor.exec_command( - f"mkdir {connection_full_path} -P gatewayId={test_data.onpremises_gateway_details.id},connectionDetails.type=SQL,connectivityType=OnPremisesGateway,connectionDetails.parameters.server={test_data.sql_server.server}.database.windows.net,connectionDetails.parameters.database={test_data.sql_server.database},credentialDetails.type=Basic,credentialDetails.values=[{{\"gatewayId\":\"{test_data.onpremises_gateway_details.id}\"}}]" + f'mkdir {connection_full_path} -P gatewayId={test_data.onpremises_gateway_details.id},connectionDetails.type=SQL,connectivityType=OnPremisesGateway,connectionDetails.parameters.server={test_data.sql_server.server}.database.windows.net,connectionDetails.parameters.database={test_data.sql_server.database},credentialDetails.type=Basic,credentialDetails.values=\'[{{"gatewayId":"{test_data.onpremises_gateway_details.id}"}}]\'' ) # Assert @@ -1396,7 +1395,7 @@ def test_mkdir_connection_with_onpremises_gateway_params_failure( # Test 3: Execute command with missing encryptedCredentials params in one of the values cli_executor.exec_command( - f"mkdir {connection_full_path} -P gatewayId={test_data.onpremises_gateway_details.id},connectionDetails.type=SQL,connectivityType=OnPremisesGateway,connectionDetails.parameters.server={test_data.sql_server.server}.database.windows.net,connectionDetails.parameters.database={test_data.sql_server.database},credentialDetails.type=Basic,credentialDetails.values=[{{\"gatewayId\":\"{test_data.onpremises_gateway_details.id}\",\"encryptedCredentials\":\"{test_data.onpremises_gateway_details.encrypted_credentials}\"}},{{\"encryptedCredentials\":\"{test_data.onpremises_gateway_details.encrypted_credentials}\"}}]" + f'mkdir {connection_full_path} -P gatewayId={test_data.onpremises_gateway_details.id},connectionDetails.type=SQL,connectivityType=OnPremisesGateway,connectionDetails.parameters.server={test_data.sql_server.server}.database.windows.net,connectionDetails.parameters.database={test_data.sql_server.database},credentialDetails.type=Basic,credentialDetails.values=\'[{{"gatewayId":"{test_data.onpremises_gateway_details.id}","encryptedCredentials":"{test_data.onpremises_gateway_details.encrypted_credentials}"}},{{"encryptedCredentials":"{test_data.onpremises_gateway_details.encrypted_credentials}"}}]\'' ) # Assert @@ -1409,7 +1408,7 @@ def test_mkdir_connection_with_onpremises_gateway_params_failure( # Test 4: Execute command with invalid json format for values cli_executor.exec_command( - f"mkdir {connection_full_path} -P gatewayId={test_data.onpremises_gateway_details.id},connectionDetails.type=SQL,connectivityType=OnPremisesGateway,connectionDetails.parameters.server={test_data.sql_server.server}.database.windows.net,connectionDetails.parameters.database={test_data.sql_server.database},credentialDetails.type=Basic,credentialDetails.values=[{{gatewayId:{test_data.onpremises_gateway_details.id}, encryptedCredentials:{test_data.onpremises_gateway_details.encrypted_credentials}}}]" + f"mkdir {connection_full_path} -P gatewayId={test_data.onpremises_gateway_details.id},connectionDetails.type=SQL,connectivityType=OnPremisesGateway,connectionDetails.parameters.server={test_data.sql_server.server}.database.windows.net,connectionDetails.parameters.database={test_data.sql_server.database},credentialDetails.type=Basic,credentialDetails.values='[{{gatewayId:{test_data.onpremises_gateway_details.id}, encryptedCredentials:{test_data.onpremises_gateway_details.encrypted_credentials}}}]'" ) # Assert @@ -1422,7 +1421,7 @@ def test_mkdir_connection_with_onpremises_gateway_params_failure( # Test 5: Execute command with invalid values as string array cli_executor.exec_command( - f"mkdir {connection_full_path} -P gatewayId={test_data.onpremises_gateway_details.id},connectionDetails.type=SQL,connectivityType=OnPremisesGateway,connectionDetails.parameters.server={test_data.sql_server.server}.database.windows.net,connectionDetails.parameters.database={test_data.sql_server.database},credentialDetails.type=Basic,credentialDetails.values=['gatewayId', 'encryptedCredentials']" + f'mkdir {connection_full_path} -P gatewayId={test_data.onpremises_gateway_details.id},connectionDetails.type=SQL,connectivityType=OnPremisesGateway,connectionDetails.parameters.server={test_data.sql_server.server}.database.windows.net,connectionDetails.parameters.database={test_data.sql_server.database},credentialDetails.type=Basic,credentialDetails.values=\'["gatewayId", "encryptedCredentials"]\'' ) # Assert @@ -1756,38 +1755,36 @@ def test_mkdir_workspace_verify_stderr_stdout_messages_json_format_success( # endregion # region Folders - + def test_mkdir_item_in_folder_listing_success( self, workspace, cli_executor, mock_print_done, mock_questionary_print, mock_fab_set_state_config, vcr_instance, cassette_name ): # Enable folder listing mock_fab_set_state_config(constant.FAB_FOLDER_LISTING_ENABLED, "true") - # Setup folder_name = f"{generate_random_string(vcr_instance, cassette_name)}.Folder" folder_full_path = cli_path_join(workspace.full_path, folder_name) - + # Create folder cli_executor.exec_command(f"mkdir {folder_full_path}") mock_print_done.assert_called_once() mock_print_done.reset_mock() - + # Create notebook in folder notebook_name = f"{generate_random_string(vcr_instance, cassette_name)}.Notebook" notebook_full_path = cli_path_join(folder_full_path, notebook_name) cli_executor.exec_command(f"mkdir {notebook_full_path}") - + # Verify notebook appears in folder listing cli_executor.exec_command(f"ls {folder_full_path}") printed_output = mock_questionary_print.call_args[0][0] assert notebook_name in printed_output - + # Cleanup rm(notebook_full_path) rm(folder_full_path) - def test_mkdir_folder_success(self, workspace, cli_executor, mock_print_done): # Setup folder_display_name = "folder" diff --git a/tests/test_commands/test_mv.py b/tests/test_commands/test_mv.py index 31db6aa80..844af71a0 100644 --- a/tests/test_commands/test_mv.py +++ b/tests/test_commands/test_mv.py @@ -764,15 +764,15 @@ def test_mv_folder_inside_workspace_success( # region Helper Methods -def ls(path, long=False, all=False): - args = _build_ls_args(path, long, all) +def ls(path, long=False, all=False, query=None): + args = _build_ls_args(path, long, all, query) context = handle_context.get_command_context(args.path) fab_ls.exec_command(args, context) -def _build_ls_args(path, long, all): +def _build_ls_args(path, long, all, query): return argparse.Namespace( - command="ls", command_path="ls", path=path, long=long, all=all + command="ls", command_path="ls", path=path, long=long, all=all, query=query )