Commit 6ab7b3d
committed
Add unit tests for X-Databricks-Workspace-Id header gating
Mirrors the Go SDK's `workspace_functions_test.go` coverage:
* `AppsImplTest.testWorkspaceIdHeaderSentWhenConfigured` — a workspace-scoped
service forwards the configured workspace ID on the
`X-Databricks-Workspace-Id` request header.
* `AppsImplTest.testWorkspaceIdHeaderOmittedWhenUnset` — when no workspace ID
is configured, the header is not sent (so calls to legacy single-workspace
hosts don't pick up an empty value).
* `BudgetsImplTest.testWorkspaceIdHeaderNotSentForAccountScopedService` — an
account-scoped service never forwards the header, even if a workspace ID is
configured. Locks in the generator gate (`if not .Service.IsAccounts`).
Signed-off-by: Divyansh Vijayvergia <divyansh.vijayvergia@databricks.com>1 parent 328e300 commit 6ab7b3d
2 files changed
Lines changed: 71 additions & 0 deletions
File tree
- databricks-sdk-java/src/test/java/com/databricks/sdk/service
- apps
- billing
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
44 | 82 | | |
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments