This repository was archived by the owner on Jul 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
src/test/java/com/microsoft/azure/storage Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1627,6 +1627,15 @@ class ContainerAPITest extends APISpec {
16271627 def " Root explicit" () {
16281628 setup :
16291629 cu = primaryServiceURL. createContainerURL(ContainerURL . ROOT_CONTAINER_NAME )
1630+ // Create root container if not exist.
1631+ try {
1632+ cu. create(null , null , null ). blockingGet()
1633+ }
1634+ catch (StorageException se) {
1635+ if (se. errorCode() != StorageErrorCode . CONTAINER_ALREADY_EXISTS ) {
1636+ throw se
1637+ }
1638+ }
16301639 BlobURL bu = cu. createAppendBlobURL(" rootblob" )
16311640
16321641 expect :
@@ -1638,7 +1647,7 @@ class ContainerAPITest extends APISpec {
16381647 PipelineOptions po = new PipelineOptions ()
16391648 po. withClient(getHttpClient())
16401649 HttpPipeline pipeline = StorageURL . createPipeline(primaryCreds, po)
1641- AppendBlobURL bu = new AppendBlobURL (new URL (" http://xclientdev3 .blob.core.windows.net/rootblob" ),
1650+ AppendBlobURL bu = new AppendBlobURL (new URL (" http://" + primaryCreds . getAccountName() + " .blob.core.windows.net/rootblob" ),
16421651 pipeline)
16431652
16441653 when :
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ class ServiceAPITest extends APISpec {
298298 def " Get stats" () {
299299 setup :
300300 BlobURLParts parts = URLParser . parse(primaryServiceURL. toURL())
301- parts. withHost(" xclientdev3 -secondary.blob.core.windows.net" )
301+ parts. withHost(primaryCreds . getAccountName() + " -secondary.blob.core.windows.net" )
302302 ServiceURL secondary = new ServiceURL (parts. toURL(),
303303 StorageURL . createPipeline(primaryCreds, new PipelineOptions ()))
304304 ServiceGetStatisticsResponse response = secondary. getStatistics(null ). blockingGet()
You can’t perform that action at this time.
0 commit comments