use of bio.terra.workspace.generated.model.ApiGcpGcsBucketAttributes in project terra-workspace-manager by DataBiosphere.
the class MakeApiResourceDescriptionTest method mapReferencedGcsBucketTest.
@Test
public void mapReferencedGcsBucketTest() throws Exception {
String bucketName = RandomStringUtils.randomAlphabetic(5).toLowerCase();
var resource = new ReferencedGcsBucketResource(workspaceId, resourceId, resourceName, description, cloning, bucketName);
ApiResourceDescription resourceDescription = resourceController.makeApiResourceDescription(resource);
validateWsmResource(resourceDescription);
ApiResourceAttributesUnion union = resourceDescription.getResourceAttributes();
ApiGcpGcsBucketAttributes attributes = union.getGcpGcsBucket();
assertThat(attributes, is(notNullValue()));
assertEquals(attributes.getBucketName(), bucketName);
}
Aggregations