Skip to content

Commit fa4c726

Browse files
maksim-zuev-dbIsaac
andcommitted
Remove device code login tests that the retry test covers
TestLoginDeviceCodeWrongConfirmationCode checks three wrong codes and a login without input, and also counts the token requests, so the tests for the same cases are no longer needed. Co-authored-by: Isaac <no-reply@databricks.com>
1 parent 3ad2537 commit fa4c726

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

‎cmd/auth/login_device_code_test.go‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -406,24 +406,6 @@ func TestLoginDeviceCodeReadsConfirmationCode(t *testing.T) {
406406
assert.Contains(t, cache.Tokens, "test")
407407
}
408408

409-
func TestLoginDeviceCodeFailsAfterWrongConfirmationCodes(t *testing.T) {
410-
server := newDeviceCodeServer(t)
411-
tm := startDeviceCodeLogin(t, "[test]\nhost = "+server.URL+"\n", "--profile", "test")
412-
tm.WaitFor("Confirmation code")
413-
tm.Type("AAAA-AAAA\nBBBB-BBBB\nCCCC-CCCC\n")
414-
_, err := tm.Result()
415-
assert.EqualError(t, err, "Invalid confirmation code (error code: invalid_request). Start login from scratch")
416-
}
417-
418-
func TestLoginDeviceCodeFailsWithoutConfirmationCode(t *testing.T) {
419-
server := newDeviceCodeServer(t)
420-
tm := startDeviceCodeLogin(t, "[test]\nhost = "+server.URL+"\n", "--profile", "test")
421-
tm.WaitFor("Confirmation code")
422-
tm.Close()
423-
_, err := tm.Result()
424-
assert.EqualError(t, err, "reading confirmation code: EOF")
425-
}
426-
427409
// The token gets the scopes requested at device authorization, so --scopes is
428410
// sent there and not with the token request.
429411
func TestLoginDeviceCodeRequestsScopes(t *testing.T) {

0 commit comments

Comments
 (0)