Skip to content

Commit c672536

Browse files
authored
Merge branch 'main' into simonfaltum/workspace-open
2 parents 59d2959 + 45afed3 commit c672536

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1254
-872
lines changed

acceptance/cmd/auth/describe/default-profile/out.test.toml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
=== Describe without --profile (should use default)
3+
4+
>>> [CLI] auth describe
5+
Host: [DATABRICKS_URL]
6+
User: [USERNAME]
7+
Authenticated with: pat
8+
-----
9+
Current configuration:
10+
✓ host: [DATABRICKS_URL] (from DATABRICKS_HOST environment variable)
11+
✓ token: ******** (from DATABRICKS_TOKEN environment variable)
12+
✓ profile: my-workspace
13+
✓ databricks_cli_path: [CLI]
14+
✓ auth_type: pat
15+
✓ rate_limit: [NUMID] (from DATABRICKS_RATE_LIMIT environment variable)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
sethome "./home"
2+
3+
# Create a config with two profiles and an explicit default.
4+
cat > "./home/.databrickscfg" <<EOF
5+
[DEFAULT]
6+
7+
[my-workspace]
8+
host = $DATABRICKS_HOST
9+
token = $DATABRICKS_TOKEN
10+
11+
[other-workspace]
12+
host = https://other.cloud.databricks.com
13+
token = other-token
14+
15+
[__settings__]
16+
default_profile = my-workspace
17+
EOF
18+
19+
title "Describe without --profile (should use default)\n"
20+
trace $CLI auth describe
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Ignore = [
2+
"home"
3+
]

acceptance/cmd/auth/login/nominal/out.databrickscfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[test]
55
host = [DATABRICKS_URL]
66
auth_type = databricks-cli
7+
8+
[__settings__]
9+
default_profile = test

acceptance/cmd/auth/login/nominal/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
Profile test was successfully saved
44

55
>>> [CLI] auth profiles
6-
Name Host Valid
7-
test [DATABRICKS_URL] YES
6+
Name Host Valid
7+
test (Default) [DATABRICKS_URL] YES

acceptance/cmd/auth/login/with-scopes/out.databrickscfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
host = [DATABRICKS_URL]
66
scopes = jobs,pipelines,clusters
77
auth_type = databricks-cli
8+
9+
[__settings__]
10+
default_profile = scoped-test
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
; The profile defined in the DEFAULT section is to be used as a fallback when no profile is explicitly specified.
2+
[DEFAULT]
3+
4+
[__settings__]

acceptance/cmd/auth/logout/delete-clears-default/out.test.toml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
=== Initial settings section
3+
[__settings__]
4+
default_profile = workspace-a
5+
6+
=== Delete the default profile
7+
>>> [CLI] auth logout --profile workspace-a --force --delete
8+
Deleted profile "workspace-a" with no tokens to clear.
9+
10+
=== Settings after deleting default — default_profile should be cleared
11+
[__settings__]
12+
13+
=== Delete a non-default profile
14+
>>> [CLI] auth logout --profile workspace-b --force --delete
15+
Deleted profile "workspace-b" with no tokens to clear.
16+
17+
=== Settings after deleting non-default — section should still be present but empty
18+
[__settings__]

0 commit comments

Comments
 (0)