Commit 568cbe4 1 parent 1707bac commit 568cbe4 Copy full SHA for 568cbe4
File tree 1 file changed +3
-4
lines changed
plugins/repository-azure/src/test/java/org/opensearch/repositories/azure
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 33
33
package org .opensearch .repositories .azure ;
34
34
35
35
import com .azure .core .http .policy .HttpPipelinePolicy ;
36
- import com .azure .identity .CredentialUnavailableException ;
37
36
import com .azure .storage .blob .BlobServiceClient ;
38
37
import com .azure .storage .common .policy .RequestRetryPolicy ;
38
+ import com .microsoft .aad .msal4j .MsalServiceException ;
39
39
import org .opensearch .common .settings .MockSecureSettings ;
40
40
import org .opensearch .common .settings .Settings ;
41
41
import org .opensearch .common .settings .SettingsException ;
@@ -202,9 +202,8 @@ public void testClientUsingManagedIdentity() throws IOException {
202
202
final BlobServiceClient client1 = azureStorageService .client ("azure1" ).v1 ();
203
203
204
204
// Expect the client to use managed identity for authentication, and it should fail because managed identity environment is
205
- // not
206
- // setup in the test
207
- final CredentialUnavailableException e = expectThrows (CredentialUnavailableException .class , () -> client1 .getAccountInfo ());
205
+ // not setup in the test
206
+ final MsalServiceException e = expectThrows (MsalServiceException .class , () -> client1 .getAccountInfo ());
208
207
assertThat (e .getMessage (), is ("Managed Identity authentication is not available." ));
209
208
}
210
209
}
You can’t perform that action at this time.
0 commit comments