use of bio.terra.workspace.model.ResourceList in project terra-workspace-manager by DataBiosphere.
the class ReferencedGitRepoLifecycle method doUserJourney.
@Override
protected void doUserJourney(TestUserSpecification testUser, WorkspaceApi workspaceApi) throws Exception {
ReferencedGcpResourceApi referencedGcpResourceApi = ClientTestUtils.getReferencedGcpResourceClient(testUser, server);
// Create the reference
GitRepoResource gitResource = GitRepoUtils.makeGitRepoReference(gitRepoAttributes, referencedGcpResourceApi, getWorkspaceId(), MultiResourcesUtils.makeName());
gitResourceId = gitResource.getMetadata().getResourceId();
// Read the reference
ResourceApi resourceApi = ClientTestUtils.getResourceClient(testUser, server);
testGetReference(gitResource, referencedGcpResourceApi, resourceApi);
// Clone the reference
testCloneReference(gitResource, referencedGcpResourceApi, workspaceApi);
// No validation checks yet, we don't validate access to git repos.
// Update the reference
testUpdateReference(referencedGcpResourceApi);
// Delete the reference
referencedGcpResourceApi.deleteGitRepoReference(getWorkspaceId(), gitResourceId);
// Enumerating all resources with no filters should be empty
ResourceList enumerateResult = resourceApi.enumerateResources(getWorkspaceId(), 0, 100, null, null);
assertTrue(enumerateResult.getResources().isEmpty());
}
Aggregations