nozjkoitop commented on code in PR #15523:
URL: https://github.com/apache/druid/pull/15523#discussion_r1444412682
##########
extensions-core/azure-extensions/src/test/java/org/apache/druid/storage/azure/AzureStorageDruidModuleTest.java:
##########
@@ -303,6 +303,25 @@ public void testBothAccountKeyAndSAStokenUnset()
);
}
+ @Test
+ public void testGetAzureUtilsWithDefaultProperties()
+ {
+ Properties properties = initializePropertes();
+ AzureAccountConfig config =
makeInjectorWithProperties(properties).getInstance(AzureAccountConfig.class);
+ String outputBlob =
AzureUtils.maybeRemoveAzurePathPrefix("blob.core.windows.net/container/blob",
config.getBlobStorageEndpoint());
+ Assert.assertEquals("container/blob", outputBlob);
+ }
+
+ @Test
+ public void testGetAzureUtilsWithDefaultCustomBlobPath()
+ {
+ Properties properties = initializePropertes();
+ properties.setProperty("druid.azure.endpointSuffix",
"core.usgovcloudapi.net");
+ AzureAccountConfig config =
makeInjectorWithProperties(properties).getInstance(AzureAccountConfig.class);
+ String outputBlob =
AzureUtils.maybeRemoveAzurePathPrefix("blob.core.usgovcloudapi.net/container/blob",
config.getBlobStorageEndpoint());
+ Assert.assertEquals("container/blob", outputBlob);
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]