File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,8 @@ func (p *AzureCredentialsProvider) hasClientSecret() bool {
212
212
switch p .Identity .Spec .Type {
213
213
case infrav1 .ServicePrincipal , infrav1 .ManualServicePrincipal :
214
214
return true
215
+ case infrav1 .ServicePrincipalCertificate :
216
+ return p .Identity .Spec .CertPath == ""
215
217
default :
216
218
return false
217
219
}
Original file line number Diff line number Diff line change @@ -166,6 +166,16 @@ func TestHasClientSecret(t *testing.T) {
166
166
Type : infrav1 .ServicePrincipalCertificate ,
167
167
},
168
168
},
169
+ want : true ,
170
+ },
171
+ {
172
+ name : "service principal with certificate path" ,
173
+ identity : & infrav1.AzureClusterIdentity {
174
+ Spec : infrav1.AzureClusterIdentitySpec {
175
+ Type : infrav1 .ServicePrincipalCertificate ,
176
+ CertPath : "something" ,
177
+ },
178
+ },
169
179
want : false ,
170
180
},
171
181
{
You can’t perform that action at this time.
0 commit comments