-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PECO-1020] Adding mock constructor method for WorkspaceClient to support mocked ApiClient #144
Conversation
…port mocked ApiClient
Thanks for contributing this! Note that WorkspaceClient.java is a generated file. You need to make this change in .codegen/workspace.java.tmpl as well, otherwise this change will be erased the next time we update the SDK. |
Done, Thanks for pointing out. |
Head branch was pushed to by a user without write access
Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
1ce88d5
to
b315cc8
Compare
jenkins merge |
* Adding mock constructor method for WorkspaceClient to support mocked ApiClient ([#144](#144)). API Changes: * Renamed permissions APIs to no longer include the service name, for example: * `getJobPermissionLevels` -> `getPermissionLevels` * `getJobPermissions` -> `getPermissions` * `setJobPermissions` -> `setPermissions` * `updateJobPermissions` -> `updatePermissions` * Changed `create()` method for `workspaceClient.volumes()` service with new required argument order. * Added `supportsElasticDisk` field for `com.databricks.sdk.service.compute.NodeType`. * Changed `create()` method for `workspaceClient.dashboards()` service with new required argument order. * Added `workspaceClient.dashboardWidgets()` service. * Added `workspaceClient.queryVisualizations()` service. * Changed `name` field for `com.databricks.sdk.service.sql.CreateDashboardRequest` to be required. * Added `dashboardFiltersEnabled` field for `com.databricks.sdk.service.sql.CreateDashboardRequest`. * Added `runAsRole` field for `com.databricks.sdk.service.sql.CreateDashboardRequest`. * Added `runAsRole` field for `com.databricks.sdk.service.sql.Query`. * Added `runAsRole` field for `com.databricks.sdk.service.sql.QueryPostContent`. * Removed `dashboardId` field for `com.databricks.sdk.service.sql.WidgetOptions`. * Changed `position` field for `com.databricks.sdk.service.sql.WidgetOptions` to `com.databricks.sdk.service.sql.WidgetPosition` class. * Removed `text` field for `com.databricks.sdk.service.sql.WidgetOptions`. * Added `description` field for `com.databricks.sdk.service.sql.WidgetOptions`. * Added `title` field for `com.databricks.sdk.service.sql.WidgetOptions`. * Added `com.databricks.sdk.service.sql.CreateQueryVisualizationRequest` class. * Added `com.databricks.sdk.service.sql.CreateWidget` class. * Added `com.databricks.sdk.service.sql.DeleteDashboardWidgetRequest` class. * Added `com.databricks.sdk.service.sql.DeleteQueryVisualizationRequest` class. * Added `com.databricks.sdk.service.sql.RunAsRole` class. * Added `com.databricks.sdk.service.sql.WidgetPosition` class. OpenAPI SHA: 09a7fa63d9ae243e5407941f200960ca14d48b07, Date: 2023-09-04
* Adding mock constructor method for WorkspaceClient to support mocked ApiClient ([#144](#144)). API Changes: * Renamed permissions APIs to no longer include the service name, for example: * `getJobPermissionLevels` -> `getPermissionLevels` * `getJobPermissions` -> `getPermissions` * `setJobPermissions` -> `setPermissions` * `updateJobPermissions` -> `updatePermissions` * Changed `create()` method for `workspaceClient.volumes()` service with new required argument order. * Added `supportsElasticDisk` field for `com.databricks.sdk.service.compute.NodeType`. * Changed `create()` method for `workspaceClient.dashboards()` service with new required argument order. * Added `workspaceClient.dashboardWidgets()` service. * Added `workspaceClient.queryVisualizations()` service. * Changed `name` field for `com.databricks.sdk.service.sql.CreateDashboardRequest` to be required. * Added `dashboardFiltersEnabled` field for `com.databricks.sdk.service.sql.CreateDashboardRequest`. * Added `runAsRole` field for `com.databricks.sdk.service.sql.CreateDashboardRequest`. * Added `runAsRole` field for `com.databricks.sdk.service.sql.Query`. * Added `runAsRole` field for `com.databricks.sdk.service.sql.QueryPostContent`. * Removed `dashboardId` field for `com.databricks.sdk.service.sql.WidgetOptions`. * Changed `position` field for `com.databricks.sdk.service.sql.WidgetOptions` to `com.databricks.sdk.service.sql.WidgetPosition` class. * Removed `text` field for `com.databricks.sdk.service.sql.WidgetOptions`. * Added `description` field for `com.databricks.sdk.service.sql.WidgetOptions`. * Added `title` field for `com.databricks.sdk.service.sql.WidgetOptions`. * Added `com.databricks.sdk.service.sql.CreateQueryVisualizationRequest` class. * Added `com.databricks.sdk.service.sql.CreateWidget` class. * Added `com.databricks.sdk.service.sql.DeleteDashboardWidgetRequest` class. * Added `com.databricks.sdk.service.sql.DeleteQueryVisualizationRequest` class. * Added `com.databricks.sdk.service.sql.RunAsRole` class. * Added `com.databricks.sdk.service.sql.WidgetPosition` class. OpenAPI SHA: 09a7fa63d9ae243e5407941f200960ca14d48b07, Date: 2023-09-04
Adding additional constructor in WorkspaceClient to support mocking ApiClient
Changes
A new constructor in WorkspaceClient to support mocking ApiClient
Tests
Ran $mvn clean package to verify all test cases and compilation errors