Skip to content

Commit e1da651

Browse files
authored
fixed the unneeded tenant id validation in azurecli login (#637)
1 parent 2c81665 commit e1da651

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

pkg/internal/token/azureclicredential.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ type AzureCLICredential struct {
1616
var _ CredentialProvider = (*AzureCLICredential)(nil)
1717

1818
func newAzureCLICredential(opts *Options) (CredentialProvider, error) {
19-
if opts.TenantID == "" {
20-
return nil, fmt.Errorf("tenant ID cannot be empty")
21-
}
2219
cred, err := azidentity.NewAzureCLICredential(&azidentity.AzureCLICredentialOptions{
2320
TenantID: opts.TenantID,
2421
})

pkg/internal/token/azureclicredential_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ func TestNewAzureCLICredential(t *testing.T) {
2020
},
2121
expectName: "AzureCLICredential",
2222
},
23-
{
24-
name: "missing tenant ID",
25-
opts: &Options{},
26-
expectErrorMsg: "tenant ID cannot be empty",
27-
},
2823
}
2924

3025
for _, tc := range testCases {

0 commit comments

Comments
 (0)