feat: tenant name and tenant ID on lines of their own
CI / Checks (pull_request) Successful in 24s
PR title / Conventional title (pull_request) Successful in 1s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kebandClaude Opus 5.5 committed 2026-10-11 10:27:19 +02:00
1 parent 1543e992bb
commit 3913989cd1
2 files changed
+4 -7

No files matched your search

+2 -5
View File
@@ -45,11 +45,8 @@ func (p *Provider) Account() (provider.Account, bool) {
user += " (service principal)"
}
add("user", user)
tenant := a.tenant
if a.tenantName != "" {
tenant = a.tenantName + " · " + a.tenant
}
add("tenant", tenant)
add("tenant", a.tenantName)
add("tenant ID", a.tenant)
if oid := str("oid"); oid != "" {
add("object ID", oid)
out.Copy, out.CopyLabel = oid, "object ID"
+2 -2
View File
@@ -35,7 +35,7 @@ func TestAccount(t *testing.T) {
got[f.Label] = f.Value
}
want := map[string]string{
"name": "Alice Example", "user": "alice@contoso.com", "tenant": "Contoso · t1",
"name": "Alice Example", "user": "alice@contoso.com", "tenant": "Contoso", "tenant ID": "t1",
"object ID": "11111111-2222-3333-4444-555555555555", "sign-in": "MFA · password",
"roles": "Global Administrator, role aaaaaaaa", "subs": "3 · default platform",
}
@@ -54,7 +54,7 @@ func TestAccount(t *testing.T) {
// Before any token: what az's list says.
claims = nil
a, _ = p.Account()
if len(a.Fields) != 3 || a.Copy != "" {
if len(a.Fields) != 4 || a.Copy != "" {
t.Errorf("without a token: %+v", a)
}
if _, ok := (&Provider{}).Account(); ok {