diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_datastore_operations.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_datastore_operations.py index 74a518e96011..391ef6524134 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_datastore_operations.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_datastore_operations.py @@ -325,5 +325,10 @@ def mount( time.sleep(5) else: rslex_fuse_subprocess_wrapper.start_fuse_mount_subprocess( - uri, mount_point, read_only, debug, credential=self._operation._config.credential + uri, + mount_point, + read_only, + debug, + credential=self._operation._config.credential, + **kwargs, ) diff --git a/sdk/ml/azure-ai-ml/tests/datastore/unittests/test_datastore_operations.py b/sdk/ml/azure-ai-ml/tests/datastore/unittests/test_datastore_operations.py index 37623af4ad24..d7a586528635 100644 --- a/sdk/ml/azure-ai-ml/tests/datastore/unittests/test_datastore_operations.py +++ b/sdk/ml/azure-ai-ml/tests/datastore/unittests/test_datastore_operations.py @@ -114,9 +114,17 @@ def test_mount_non_persistent( path="azureml://datastores/random_name", mount_point="/tmp/mount/random-local-path-for-datastore/", persistent=False, + client_id="test-client-id", + identity_endpoint_type="Imds", ) mock_build_uri.assert_called_once() mock_start_subprocess.assert_called_once() + assert ( + mock_start_subprocess.call_args.kwargs["credential"] + == mock_datastore_operation._operation._config.credential + ) + assert mock_start_subprocess.call_args.kwargs["client_id"] == "test-client-id" + assert mock_start_subprocess.call_args.kwargs["identity_endpoint_type"] == "Imds" def test_get_default(self, mock_from_rest, mock_datastore_operation: DatastoreOperations): mock_datastore_operation.get_default()