Search in sources :

Example 16 with StorageLocation

use of com.instaclustr.esop.impl.StorageLocation in project esop by instaclustr.

the class StorageLocationTest method updateGlobalLocationTest.

@Test
public void updateGlobalLocationTest() {
    StorageLocation globalLocation = new StorageLocation("oracle://my-bucket");
    StorageLocation updated = StorageLocation.update(globalLocation, "clusterName", "datacenterId", "nodeId");
    assertEquals(updated.storageProvider, "oracle");
    assertEquals(updated.bucket, "my-bucket");
    assertEquals(updated.clusterId, "clusterName");
    assertEquals(updated.datacenterId, "datacenterId");
    assertEquals(updated.nodeId, "nodeId");
    assertTrue(updated.cloudLocation);
    assertFalse(updated.globalRequest);
}
Also used : StorageLocation(com.instaclustr.esop.impl.StorageLocation) Test(org.testng.annotations.Test)

Example 17 with StorageLocation

use of com.instaclustr.esop.impl.StorageLocation in project esop by instaclustr.

the class StorageLocationTest method storageLocationTest.

@Test
public void storageLocationTest() {
    StorageLocation storageLocation = new StorageLocation("gcp://bucket/cluster/dc/node");
    storageLocation.validate();
    assertEquals(storageLocation.storageProvider, "gcp");
    assertEquals(storageLocation.bucket, "bucket");
    assertEquals(storageLocation.clusterId, "cluster");
    assertEquals(storageLocation.datacenterId, "dc");
    assertEquals(storageLocation.nodeId, "node");
}
Also used : StorageLocation(com.instaclustr.esop.impl.StorageLocation) Test(org.testng.annotations.Test)

Example 18 with StorageLocation

use of com.instaclustr.esop.impl.StorageLocation in project esop by instaclustr.

the class StorageLocationTest method updateStorageLocationTest.

@Test
public void updateStorageLocationTest() {
    StorageLocation storageLocation = new StorageLocation("gcp://bucket/cluster/dc/global");
    StorageLocation updatedLocation = StorageLocation.updateNodeId(storageLocation, "node2");
    assertEquals(updatedLocation.nodeId, "node2");
}
Also used : StorageLocation(com.instaclustr.esop.impl.StorageLocation) Test(org.testng.annotations.Test)

Example 19 with StorageLocation

use of com.instaclustr.esop.impl.StorageLocation in project esop by instaclustr.

the class StorageLocationTest method updateDatacenterIdLocationTest.

@Test
public void updateDatacenterIdLocationTest() {
    StorageLocation location = new StorageLocation("oracle://my-bucket/clusterName/datacenterId/nodeId");
    StorageLocation updated = StorageLocation.updateDatacenter(location, "datacenterId2");
    assertEquals(updated.storageProvider, "oracle");
    assertEquals(updated.bucket, "my-bucket");
    assertEquals(updated.clusterId, "clusterName");
    assertEquals(updated.datacenterId, "datacenterId2");
    assertEquals(updated.nodeId, "nodeId");
    assertTrue(updated.cloudLocation);
    assertFalse(updated.globalRequest);
}
Also used : StorageLocation(com.instaclustr.esop.impl.StorageLocation) Test(org.testng.annotations.Test)

Example 20 with StorageLocation

use of com.instaclustr.esop.impl.StorageLocation in project esop by instaclustr.

the class StorageLocationTest method updateClusterNameLocationTest.

@Test
public void updateClusterNameLocationTest() {
    StorageLocation location = new StorageLocation("oracle://my-bucket/clusterName/datacenterId/nodeId");
    StorageLocation updated = StorageLocation.updateClusterName(location, "clusterName2");
    assertEquals(updated.storageProvider, "oracle");
    assertEquals(updated.bucket, "my-bucket");
    assertEquals(updated.clusterId, "clusterName2");
    assertEquals(updated.datacenterId, "datacenterId");
    assertEquals(updated.nodeId, "nodeId");
    assertTrue(updated.cloudLocation);
    assertFalse(updated.globalRequest);
}
Also used : StorageLocation(com.instaclustr.esop.impl.StorageLocation) Test(org.testng.annotations.Test)

Aggregations

StorageLocation (com.instaclustr.esop.impl.StorageLocation)24 Test (org.testng.annotations.Test)16 Path (java.nio.file.Path)9 ListOperationRequest (com.instaclustr.esop.impl.list.ListOperationRequest)6 RestoreOperationRequest (com.instaclustr.esop.impl.restore.RestoreOperationRequest)5 BackupOperationRequest (com.instaclustr.esop.impl.backup.BackupOperationRequest)4 AmazonS3 (com.amazonaws.services.s3.AmazonS3)2 AzureBucketService (com.instaclustr.esop.azure.AzureBucketService)2 GCPBucketService (com.instaclustr.esop.gcp.GCPBucketService)2 LocalFileRestorer (com.instaclustr.esop.local.LocalFileRestorer)2 S3BucketService (com.instaclustr.esop.s3.aws.S3BucketService)2 Bucket (com.google.cloud.storage.Bucket)1 Storage (com.google.cloud.storage.Storage)1 AzureBackuper (com.instaclustr.esop.azure.AzureBackuper)1 AzureRestorer (com.instaclustr.esop.azure.AzureRestorer)1 AbstractBackupTest (com.instaclustr.esop.backup.embedded.AbstractBackupTest)1 GCPBackuper (com.instaclustr.esop.gcp.GCPBackuper)1 GCPRestorer (com.instaclustr.esop.gcp.GCPRestorer)1 AllManifestsReport (com.instaclustr.esop.impl.Manifest.AllManifestsReport)1 ManifestReport (com.instaclustr.esop.impl.Manifest.ManifestReporter.ManifestReport)1