use of bio.terra.workspace.api.Alpha1Api in project terra-workspace-manager by DataBiosphere.
the class EnumerateJobs method doSetup.
@Override
public void doSetup(List<TestUserSpecification> testUsers, WorkspaceApi workspaceApi) throws Exception {
// initialize workspace
super.doSetup(testUsers, workspaceApi);
TestUserSpecification workspaceOwner = testUsers.get(0);
// If we like the alpha1 API for job enumeration, then we can maybe piggyback on
// the EnumerateResources test instead of creating our own set.
ApiClient ownerApiClient = ClientTestUtils.getClientForTestUser(workspaceOwner, server);
ownerControlledGcpResourceApi = new ControlledGcpResourceApi(ownerApiClient);
ownerReferencedGcpResourceApi = new ReferencedGcpResourceApi(ownerApiClient);
alpha1Api = new Alpha1Api(ownerApiClient);
// Create a cloud context for the workspace
CloudContextMaker.createGcpCloudContext(getWorkspaceId(), workspaceApi);
// create the resources for the test
logger.info("Creating {} resources", RESOURCE_COUNT);
resourceList = MultiResourcesUtils.makeResources(ownerReferencedGcpResourceApi, ownerControlledGcpResourceApi, getWorkspaceId());
logger.info("Created {} resources", resourceList.size());
logger.info("Cleaning up {} resources", resourceList.size());
MultiResourcesUtils.cleanupResources(resourceList, ownerControlledGcpResourceApi, getWorkspaceId());
logger.info("Cleaned up {} resources", resourceList.size());
}
Aggregations