use of bio.terra.janitor.model.AzureDisk in project terra-cloud-resource-lib by DataBiosphere.
the class ComputeRequestDataTest method serializeCreateDisk.
@Test
public void serializeCreateDisk() {
CreateDiskRequestData createDisk = CreateDiskRequestData.builder().setName("my-disk").setTenantId("my-tenant").setSubscriptionId("my-sub").setResourceGroupName("my-rg").setRegion(Region.US_EAST).setSize(500).build();
assertEquals(ComputeManagerOperation.AZURE_CREATE_DISK, createDisk.cloudOperation());
assertEquals("{\"tenantId\":\"my-tenant\",\"subscriptionId\":\"my-sub\",\"resourceGroupName\":\"my-rg\",\"name\":\"my-disk\",\"region\":\"eastus\",\"size\":500}", createDisk.serialize().toString());
assertEquals(Optional.of(new CloudResourceUid().azureDisk(new AzureDisk().resourceGroup(azureResourceGroup(createDisk)).diskName("my-disk"))), createDisk.resourceUidCreation());
}
Aggregations