Skip to content

Commit aef434e

Browse files
Update auth logout acceptance tests for --yes.
Align the logout acceptance scripts and expected output with the new confirmation flag so this branch rebases cleanly onto the shared interaction flag changes.
1 parent 7eacbbc commit aef434e

15 files changed

Lines changed: 22 additions & 22 deletions

File tree

‎acceptance/cmd/auth/logout/default-profile/output.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ host = https://dev.cloud.databricks.com
1111
auth_type = databricks-cli
1212

1313
=== Delete the DEFAULT profile
14-
>>> [CLI] auth logout --profile DEFAULT --force --delete
14+
>>> [CLI] auth logout --profile DEFAULT --yes --delete
1515
Logged out of and deleted profile "DEFAULT".
1616

1717
=== Backup file should exist

‎acceptance/cmd/auth/logout/default-profile/script‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ title "Initial config\n"
1616
cat "./home/.databrickscfg"
1717

1818
title "Delete the DEFAULT profile"
19-
trace $CLI auth logout --profile DEFAULT --force --delete
19+
trace $CLI auth logout --profile DEFAULT --yes --delete
2020

2121
title "Backup file should exist\n"
2222
assert_backup_exists

‎acceptance/cmd/auth/logout/delete-clears-default/output.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
default_profile = workspace-a
55

66
=== Delete the default profile
7-
>>> [CLI] auth logout --profile workspace-a --force --delete
7+
>>> [CLI] auth logout --profile workspace-a --yes --delete
88
Deleted profile "workspace-a" with no tokens to clear.
99

1010
=== Settings after deleting default — default_profile should be cleared
1111
[__settings__]
1212

1313
=== Delete a non-default profile
14-
>>> [CLI] auth logout --profile workspace-b --force --delete
14+
>>> [CLI] auth logout --profile workspace-b --yes --delete
1515
Deleted profile "workspace-b" with no tokens to clear.
1616

1717
=== Settings after deleting non-default — section should still be present but empty

‎acceptance/cmd/auth/logout/delete-clears-default/script‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ title "Initial settings section\n"
2222
cat "./home/.databrickscfg" | grep -A1 __settings__
2323

2424
title "Delete the default profile"
25-
trace $CLI auth logout --profile workspace-a --force --delete
25+
trace $CLI auth logout --profile workspace-a --yes --delete
2626

2727
title "Settings after deleting default — default_profile should be cleared\n"
2828
cat "./home/.databrickscfg" | grep -A1 __settings__
2929

3030
title "Delete a non-default profile"
31-
trace $CLI auth logout --profile workspace-b --force --delete
31+
trace $CLI auth logout --profile workspace-b --yes --delete
3232

3333
title "Settings after deleting non-default — section should still be present but empty\n"
3434
cat "./home/.databrickscfg" | grep -A1 __settings__

‎acceptance/cmd/auth/logout/delete-pat-token-profile/output.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ host = https://dev.cloud.databricks.com
88
token = dev-pat-token
99

1010
=== Logout without --delete — should report no changes for non-U2M profile
11-
>>> [CLI] auth logout --profile dev --force
11+
>>> [CLI] auth logout --profile dev --yes
1212
No tokens to clear for profile "dev". Use --delete to remove it from the config file.
1313

1414
=== Config after logout — profile should be unchanged
@@ -20,7 +20,7 @@ host = https://dev.cloud.databricks.com
2020
token = dev-pat-token
2121

2222
=== Logout with --delete — should delete the profile
23-
>>> [CLI] auth logout --profile dev --force --delete
23+
>>> [CLI] auth logout --profile dev --yes --delete
2424
Deleted profile "dev" with no tokens to clear.
2525

2626
=== Backup file should exist

‎acceptance/cmd/auth/logout/delete-pat-token-profile/script‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ title "Initial config\n"
1313
cat "./home/.databrickscfg"
1414

1515
title "Logout without --delete — should report no changes for non-U2M profile"
16-
trace $CLI auth logout --profile dev --force
16+
trace $CLI auth logout --profile dev --yes
1717

1818
title "Config after logout — profile should be unchanged\n"
1919
cat "./home/.databrickscfg"
2020

2121
title "Logout with --delete — should delete the profile"
22-
trace $CLI auth logout --profile dev --force --delete
22+
trace $CLI auth logout --profile dev --yes --delete
2323

2424
title "Backup file should exist\n"
2525
assert_backup_exists

‎acceptance/cmd/auth/logout/error-cases/script‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ auth_type = databricks-cli
1010
EOF
1111

1212
title "Logout of non-existent profile\n"
13-
errcode $CLI auth logout --profile nonexistent --force
13+
errcode $CLI auth logout --profile nonexistent --yes
1414

1515
title "Logout without --profile in non-interactive mode\n"
16-
errcode $CLI auth logout --force
16+
errcode $CLI auth logout --yes

‎acceptance/cmd/auth/logout/last-non-default/output.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ host = https://only.cloud.databricks.com
99
auth_type = databricks-cli
1010

1111
=== Delete the only non-default profile
12-
>>> [CLI] auth logout --profile only-profile --force --delete
12+
>>> [CLI] auth logout --profile only-profile --yes --delete
1313
Logged out of and deleted profile "only-profile".
1414

1515
=== Backup file should exist

‎acceptance/cmd/auth/logout/last-non-default/script‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ title "Initial config\n"
1414
cat "./home/.databrickscfg"
1515

1616
title "Delete the only non-default profile"
17-
trace $CLI auth logout --profile only-profile --force --delete
17+
trace $CLI auth logout --profile only-profile --yes --delete
1818

1919
title "Backup file should exist\n"
2020
assert_backup_exists

‎acceptance/cmd/auth/logout/ordering-preserved/output.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ account_id = account-id
2222
auth_type = databricks-cli
2323

2424
=== Delete first non-default profile (alpha)
25-
>>> [CLI] auth logout --profile alpha --force --delete
25+
>>> [CLI] auth logout --profile alpha --yes --delete
2626
Logged out of and deleted profile "alpha".
2727

2828
=== Backup file should exist
@@ -46,7 +46,7 @@ account_id = account-id
4646
auth_type = databricks-cli
4747

4848
=== Delete last profile (gamma)
49-
>>> [CLI] auth logout --profile gamma --force --delete
49+
>>> [CLI] auth logout --profile gamma --yes --delete
5050
Logged out of and deleted profile "gamma".
5151

5252
=== Config after deleting gamma

0 commit comments

Comments
 (0)