Skip to content

Commit

Permalink
Fix test error in AzureAppConfigurationProviderURLParserTest$TestServ…
Browse files Browse the repository at this point in the history
…icePrincipleSecret.testValidUrlWithSecret
  • Loading branch information
ting-lan-wang committed Nov 8, 2024
1 parent 5638d56 commit e3daea5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,27 +103,31 @@ void beforeEach() {
@Test
void testValidUrlWithSecret() throws SQLException {
String url = composeURL(options);
removeCacheEntry(url);
verifyValidUrl(url);
}

@Test
void testInvalidUrlWithSecret() {
String invalidUrl = composeURL(options)
.replace("@config-azure", "@config-azurex");
removeCacheEntry(invalidUrl);
verifyInvalidTypeThrowsException(invalidUrl);
}

@Test
void testInvalidKeyWithSecret() {
ConfigurationClient client = getSecretCredentialClient();
String url = composeURL(options);
removeCacheEntry(url);
verifyInvalidKeyThrowsException(client, url);
}

@Test
void testNonWhitelistedKeyWithSecret() {
ConfigurationClient client = getSecretCredentialClient();
String url = composeURL(options);
removeCacheEntry(url);
verifyNonWhitelistedKeyThrowsException(client, url);
}
}
Expand All @@ -141,6 +145,7 @@ public void testServicePrincipleCertificate() throws SQLException {
AzureTestProperty.AZURE_CLIENT_CERTIFICATE_PATH),
"AZURE_TENANT_ID=" + TestProperties.getOrAbort(
AzureTestProperty.AZURE_TENANT_ID));
removeCacheEntry(url);
verifyValidUrl(url);
}

Expand All @@ -159,6 +164,7 @@ public void testServicePrinciplePfxCertificate() throws SQLException {
AzureTestProperty.AZURE_CLIENT_PFX_PASSWORD),
"AZURE_TENANT_ID=" + TestProperties.getOrAbort(
AzureTestProperty.AZURE_TENANT_ID));
removeCacheEntry(url);
verifyValidUrl(url);
}

Expand Down

0 comments on commit e3daea5

Please sign in to comment.