use of bio.terra.workspace.model.UpdateWorkspaceRequestBody in project terra-workspace-manager by DataBiosphere.
the class WorkspaceLifecycle method doUserJourney.
@Override
public void doUserJourney(TestUserSpecification testUser, WorkspaceApi workspaceApi) throws ApiException {
UUID workspaceId = UUID.randomUUID();
CreateWorkspaceRequestBody requestBody = new CreateWorkspaceRequestBody().id(workspaceId).stage(WorkspaceStageModel.MC_WORKSPACE);
workspaceApi.createWorkspace(requestBody);
ClientTestUtils.assertHttpSuccess(workspaceApi, "CREATE workspace");
WorkspaceDescription workspaceDescription = workspaceApi.getWorkspace(workspaceId);
ClientTestUtils.assertHttpSuccess(workspaceApi, "GET workspace");
assertThat(workspaceDescription.getId(), equalTo(workspaceId));
assertThat(workspaceDescription.getStage(), equalTo(WorkspaceStageModel.MC_WORKSPACE));
UpdateWorkspaceRequestBody updateBody = new UpdateWorkspaceRequestBody().displayName(workspaceName).description(workspaceDescriptionString);
WorkspaceDescription updatedDescription = workspaceApi.updateWorkspace(updateBody, workspaceId);
ClientTestUtils.assertHttpSuccess(workspaceApi, "PATCH workspace");
assertThat(updatedDescription.getDisplayName(), equalTo(workspaceName));
assertThat(updatedDescription.getDescription(), equalTo(workspaceDescriptionString));
workspaceApi.deleteWorkspace(workspaceId);
ClientTestUtils.assertHttpSuccess(workspaceApi, "DELETE workspace");
}
Aggregations