stripe-cli
stripe-cli copied to clipboard
login test fails
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 https://github.com/stripe/stripe-cli/blob/71b7e384b2389466acdbb452c1b38a623a383d0b/pkg/login/client_login_test.go#L90 but that does not seem to match the logic in https://github.com/stripe/stripe-cli/blob/71b7e384b2389466acdbb452c1b38a623a383d0b/pkg/login/client_login.go#L58 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).