Skip to content

Commit 02bfdf4

Browse files
maksim-zuev-dbIsaac
andcommitted
Add acceptance tests for an invalid host in auth login and auth token
The invalid host error is user-visible output of both commands, and the auth token path was not exercised end to end. Co-authored-by: Isaac <no-reply@databricks.com>
1 parent c337fb7 commit 02bfdf4

8 files changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Cloud = false
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
>>> musterr [CLI] auth login --host ?o=123 --profile test
3+
Error: invalid host "?o=123"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sethome "./home"
2+
3+
# A host that is empty without its query params is rejected before login
4+
# can fall back to discovery or DATABRICKS_HOST.
5+
trace musterr $CLI auth login --host '?o=123' --profile test
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Ignore = [
2+
"home"
3+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Cloud = false
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
>>> musterr [CLI] auth token --host ?o=123
3+
Error: invalid host "?o=123"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
sethome "./home"
2+
3+
unset DATABRICKS_HOST
4+
unset DATABRICKS_TOKEN
5+
unset DATABRICKS_CONFIG_PROFILE
6+
7+
# A host that is empty without its query params is rejected instead of
8+
# falling back to DATABRICKS_HOST.
9+
trace musterr $CLI auth token --host '?o=123'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Ignore = [
2+
"home"
3+
]

0 commit comments

Comments
 (0)