Merge branch 'pr/tests-azure-repo'
This commit is contained in:
commit
d6e6ef4ec4
|
@ -61,6 +61,16 @@ public class AzureStorageServiceTest extends ESTestCase {
|
|||
assertThat(client.getEndpoint(), is(URI.create("https://azure1")));
|
||||
}
|
||||
|
||||
public void testGetDefaultClientWithNoSecondary() {
|
||||
AzureStorageServiceImpl azureStorageService = new AzureStorageServiceMock(Settings.builder()
|
||||
.put("cloud.azure.storage.azure1.account", "myaccount1")
|
||||
.put("cloud.azure.storage.azure1.key", "mykey1")
|
||||
.build());
|
||||
azureStorageService.doStart();
|
||||
CloudBlobClient client = azureStorageService.getSelectedClient(null, LocationMode.PRIMARY_ONLY);
|
||||
assertThat(client.getEndpoint(), is(URI.create("https://azure1")));
|
||||
}
|
||||
|
||||
public void testGetSelectedClientPrimary() {
|
||||
AzureStorageServiceImpl azureStorageService = new AzureStorageServiceMock(settings);
|
||||
azureStorageService.doStart();
|
||||
|
@ -82,6 +92,13 @@ public class AzureStorageServiceTest extends ESTestCase {
|
|||
assertThat(client.getEndpoint(), is(URI.create("https://azure3")));
|
||||
}
|
||||
|
||||
public void testGetDefaultClientWithPrimaryAndSecondaries() {
|
||||
AzureStorageServiceImpl azureStorageService = new AzureStorageServiceMock(settings);
|
||||
azureStorageService.doStart();
|
||||
CloudBlobClient client = azureStorageService.getSelectedClient(null, LocationMode.PRIMARY_ONLY);
|
||||
assertThat(client.getEndpoint(), is(URI.create("https://azure1")));
|
||||
}
|
||||
|
||||
public void testGetSelectedClientNonExisting() {
|
||||
AzureStorageServiceImpl azureStorageService = new AzureStorageServiceMock(settings);
|
||||
azureStorageService.doStart();
|
||||
|
|
Loading…
Reference in New Issue