fix(auth): print only a token that belongs to the selected account

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-18 17:15:52 +02:00
1 parent 4d6e68ed85
commit 219798732d
3 files changed
+17 -2

No files matched your search

+3 -1
View File
@@ -742,7 +742,9 @@ func TestAuthSwitchSelectsInstanceAndAccount(t *testing.T) {
}
func TestAuthTokenPrintsTheCredential(t *testing.T) {
const instance = "https://example.org"
server := newAuthenticatedServer(http.NotFoundHandler())
defer server.Close()
instance := server.URL
deps, out, _ := testDeps(t)
configureAccounts(t, deps, instance, "alice", "alice")
require.NoError(t, Execute(context.Background(), deps, []string{"auth", "token"}))