Skip to content

Move the interactive device code login tests to the terminal emulator - #7222

Open
maksim-zuev-db wants to merge 2 commits into
device-code-split-stepsfrom
device-code-interactive-tests
Open

maksim-zuev-db wants to merge 2 commits into
device-code-split-stepsfrom
device-code-interactive-tests

Conversation

@maksim-zuev-db

Copy link
Copy Markdown
Member

Stacked on #7217.

Changes

The interactive device code login is now tested with termtest against the fake server, instead of acceptance tests that pipe the confirmation code into stdin. The device-code/nominal and device-code/wrong-code acceptance tests are removed. No production code changes.

Why

Users type the confirmation code into a terminal, and the upcoming non-interactive login (#7220) takes over when stdin is not a terminal, so the piped tests would stop testing the interactive flow.

Tests

The new tests cover re-entering a wrong or blank code, running out of attempts, closed input, the stored token, and the scopes of the device authorization request.

This pull request and its description were written by Isaac.

The acceptance tests of the interactive device code login pipe the
confirmation code into stdin, while users type it into a terminal. Run the
login in the terminal emulator against the fake server instead. The tests
cover re-entering a wrong or blank code, running out of attempts, closed
input, the stored token, and the scopes of the device authorization request.

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: bcf2f96

Run: 40709162375

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 281 15 5:25
✅​ aws-windows-latest-4core-16gb 283 13 3:52
✅​ azure linux-2core-8gb 280 15 5:42
✅​ azure-windows-latest-4core-16gb 282 13 3:39
✅​ gcp linux-2core-8gb 281 15 6:00
✅​ gcp-windows-latest-4core-16gb 283 13 3:41
Top 6 slowest tests (at least 2 minutes):
duration env testname
3:59 azure linux-2core-8gb TestAccept
3:45 gcp linux-2core-8gb TestAccept
3:41 aws linux-2core-8gb TestAccept
3:36 gcp-windows-latest-4core-16gb TestAccept
3:34 azure-windows-latest-4core-16gb TestAccept
3:33 aws-windows-latest-4core-16gb TestAccept

@maksim-zuev-db
maksim-zuev-db force-pushed the device-code-interactive-tests branch from 1d574cc to fc8cd8d Compare October 28, 2026 14:35
Check the host, workspace ID, auth type and scopes of the saved profile
instead of matching auth_type in the raw file. The scopes test now
starts from an empty config with --host, so creating a profile from the
flag is covered too. Clear the environment so DATABRICKS_* variables of
the developer don't end up in the saved profile.

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants