Repository navigation
Expand file tree
/
Copy pathscript
More file actions
39 lines (31 loc) · 1.84 KB
/
Copy pathscript
File metadata and controls
39 lines (31 loc) · 1.84 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
sethome "./home"
# Acceptance tests run the CLI without a terminal on stdin, so device code
# login runs non-interactively.
title "Start the login without a profile\n"
trace $CLI auth login --host $DATABRICKS_HOST --use-device-code
title "The first step stores the device code and saves no profile\n"
trace find.py home
trace cache_keys
title "Confirm the login\n"
trace $CLI auth login --host $DATABRICKS_HOST --use-device-code --user-code WDJB-0001 --confirmation-code FTFA-QQKY
trace $CLI auth token --host $DATABRICKS_HOST | gron.py | grep access_token
trace cache_keys
title "Start the login with a profile\n"
trace $CLI auth login --host $DATABRICKS_HOST --profile test --use-device-code
title "Confirm the login\n"
trace $CLI auth login --host $DATABRICKS_HOST --profile test --use-device-code --user-code WDJB-0002 --confirmation-code FTFA-QQKY
trace $CLI auth token --profile test | gron.py | grep access_token
trace $CLI auth profiles
# The pending login is stored next to the token, so the token keeps working
# until the login is confirmed.
title "Start the login again with the host from the saved profile\n"
trace $CLI auth login --profile test --use-device-code
trace $CLI auth token --profile test | gron.py | grep access_token
trace $CLI auth login --profile test --use-device-code --user-code WDJB-0003 --confirmation-code FTFA-QQKY
trace cache_keys
trace print_requests.py --oneline //oidc/v1/device/auth //oidc/v1/token
title "An AI agent gets notes on passing the login on to the user\n"
trace AGENT=test-agent $CLI auth login --host $DATABRICKS_HOST --profile agent --use-device-code
trace AGENT=test-agent $CLI auth login --host $DATABRICKS_HOST --profile agent --use-device-code --user-code WDJB-0004 --confirmation-code FTFA-QQKY
# Track the .databrickscfg file that was created to surface changes.
mv "./home/.databrickscfg" "./out.databrickscfg"