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);
}
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");
}
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");
}
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);
}
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);
}
Aggregations