Skip to content

login test fails #1020

Description

@an0nfunc

Issue

Running tests with version 1.13.7 (and 1.13.8), the login test fails because it seems to except that Login() tries to open a browser

assert.Equal(t, true, didOpenBrowser)
but that does not seem to match the logic in
if isSSH() || !canOpenBrowser() {
where is seems there are conditions that make stripe-cli not try to open a browser at all.

Expected Behavior

This test should not fail.

Steps to reproduce

Run tests on a standard linux terminal.

Traceback

Your pairing code is: dinosaur-pineapple-polkadot
This pairing code verifies your authentication with Stripe.
To authenticate with Stripe, please go to: https://dashboard.stripe.com/stripecli/confirm_auth?t=cliauth_secret
Waiting for confirmation...
{"redeemed":  true, "account_id": "acct_123", "testmode_key_secret": "sk_test_1234", "account_display_name": "test_disp_name"}

> Done! The Stripe CLI is configured for test_disp_name with account id acct_123

Please note: this key will expire after 90 days, at which point you'll need to re-authenticate.
--- FAIL: TestLogin (0.00s)
    client_login_test.go:90:
        	Error Trace:	/build/stripe-cli/src/stripe-cli-1.13.7/pkg/login/client_login_test.go:90
        	Error:      	Not equal:
        	            	expected: true
        	            	actual  : false
        	Test:       	TestLogin
FAIL
coverage: 19.3% of statements in ./...
FAIL	github.com/stripe/stripe-cli/pkg/login	0.214s

Environment

Linux, using stripe-cli 1.13.7 (still happens with 1.14.1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions