-
Notifications
You must be signed in to change notification settings - Fork 160
Expand file tree
/
Copy pathscript
More file actions
44 lines (33 loc) · 1.02 KB
/
script
File metadata and controls
44 lines (33 loc) · 1.02 KB
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
34
35
36
37
38
39
40
41
42
43
44
sethome "./home"
cat > "./home/.databrickscfg" <<EOF
; The profile defined in the DEFAULT section is to be used as a fallback when no profile is explicitly specified.
[DEFAULT]
host = ${DATABRICKS_HOST}
auth_type = databricks-cli
; First workspace — alpha
[alpha]
host = ${DATABRICKS_HOST}
auth_type = databricks-cli
; Second workspace — beta
[beta]
host = ${DATABRICKS_HOST}
auth_type = databricks-cli
; Third workspace — gamma
[gamma]
host = https://accounts.cloud.databricks.com
account_id = account-id
auth_type = databricks-cli
EOF
title "Initial config\n"
cat "./home/.databrickscfg"
title "Delete first non-default profile (alpha)"
trace $CLI auth logout --profile alpha --force --delete
title "Backup file should exist\n"
assert_backup_exists
title "Config after deleting alpha\n"
cat "./home/.databrickscfg"
title "Delete last profile (gamma)"
trace $CLI auth logout --profile gamma --force --delete
title "Config after deleting gamma\n"
cat "./home/.databrickscfg"
cp "./home/.databrickscfg" "./out.databrickscfg"