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 {
212212 switch p .Identity .Spec .Type {
213213 case infrav1 .ServicePrincipal , infrav1 .ManualServicePrincipal :
214214 return true
215+ case infrav1 .ServicePrincipalCertificate :
216+ return p .Identity .Spec .CertPath == ""
215217 default :
216218 return false
217219 }
Original file line number Diff line number Diff line change @@ -166,6 +166,16 @@ func TestHasClientSecret(t *testing.T) {
166166 Type : infrav1 .ServicePrincipalCertificate ,
167167 },
168168 },
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+ },
169179 want : false ,
170180 },
171181 {
You can’t perform that action at this time.
0 commit comments