From 1a5415d473866e2d4bb7418e9e5a46308d7e7f9b Mon Sep 17 00:00:00 2001 From: Morgan Taylor Date: Mon, 29 Jan 2024 11:33:54 -0500 Subject: [PATCH 1/2] add tests for JobApiUtils, refactor test utils --- .../pipelines/controller/JobApiUtilsTest.java | 251 ++++++++++++++++++ .../controller/JobsApiControllerTest.java | 55 +--- .../PipelinesApiControllerTest.java | 9 +- .../testutils/StairwayTestUtils.java | 52 +++- .../terra/pipelines/testutils/TestUtils.java | 2 + 5 files changed, 315 insertions(+), 54 deletions(-) create mode 100644 service/src/test/java/bio/terra/pipelines/controller/JobApiUtilsTest.java diff --git a/service/src/test/java/bio/terra/pipelines/controller/JobApiUtilsTest.java b/service/src/test/java/bio/terra/pipelines/controller/JobApiUtilsTest.java new file mode 100644 index 00000000..b804ea6a --- /dev/null +++ b/service/src/test/java/bio/terra/pipelines/controller/JobApiUtilsTest.java @@ -0,0 +1,251 @@ +package bio.terra.pipelines.controller; + +import static org.junit.jupiter.api.Assertions.*; + +import bio.terra.common.exception.ErrorReportException; +import bio.terra.pipelines.app.controller.JobApiUtils; +import bio.terra.pipelines.dependencies.stairway.JobMapKeys; +import bio.terra.pipelines.dependencies.stairway.exception.InternalStairwayException; +import bio.terra.pipelines.dependencies.stairway.exception.InvalidResultStateException; +import bio.terra.pipelines.dependencies.stairway.model.EnumeratedJobs; +import bio.terra.pipelines.generated.model.ApiErrorReport; +import bio.terra.pipelines.generated.model.ApiGetJobsResponse; +import bio.terra.pipelines.generated.model.ApiJobReport; +import bio.terra.pipelines.testutils.StairwayTestUtils; +import bio.terra.pipelines.testutils.TestUtils; +import bio.terra.stairway.FlightMap; +import bio.terra.stairway.FlightState; +import bio.terra.stairway.FlightStatus; +import java.util.List; +import org.junit.jupiter.api.Test; +import org.springframework.http.HttpStatus; + +public class JobApiUtilsTest { + + @Test + void testMapEnumeratedJobsToApi() { + EnumeratedJobs bothJobs = StairwayTestUtils.ENUMERATED_JOBS; + + ApiGetJobsResponse mappedResponse = JobApiUtils.mapEnumeratedJobsToApi(bothJobs); + + assertEquals(bothJobs.getTotalResults(), mappedResponse.getTotalResults()); + assertEquals(bothJobs.getPageToken(), mappedResponse.getPageToken()); + assertEquals(bothJobs.getResults().size(), mappedResponse.getResults().size()); + assertEquals( + bothJobs.getResults().get(0).getFlightState().getFlightId(), + mappedResponse.getResults().get(0).getId()); + assertEquals( + bothJobs.getResults().get(1).getFlightState().getFlightId(), + mappedResponse.getResults().get(1).getId()); + } + + @Test + void testMapFlightStateToApiJobReportSucceeded() { + FlightState flightState = StairwayTestUtils.FLIGHT_STATE_DONE_SUCCESS_1; + + ApiJobReport apiJobReport = JobApiUtils.mapFlightStateToApiJobReport(flightState); + + assertEquals(TestUtils.TEST_NEW_UUID.toString(), apiJobReport.getId()); + assertEquals(StairwayTestUtils.TEST_DESCRIPTION, apiJobReport.getDescription()); + assertEquals( + "SUCCEEDED", apiJobReport.getStatus().name()); // "SUCCESS" gets mapped to "SUCCEEDED" + assertEquals(StairwayTestUtils.TIME_SUBMITTED_1.toString(), apiJobReport.getSubmitted()); + assertEquals(StairwayTestUtils.TIME_COMPLETED_1.toString(), apiJobReport.getCompleted()); + assertEquals("", apiJobReport.getResultURL()); + // if there is no status code in the working map, we assume it's a success/200 + assertEquals(200, apiJobReport.getStatusCode()); + } + + @Test + void testMapFlightStateToApiJobReportSucceededNoCompletedTime() { + FlightState flightState = + StairwayTestUtils.constructFlightStateWithStatusAndId( + FlightStatus.SUCCESS, + TestUtils.TEST_NEW_UUID, + StairwayTestUtils.CREATE_JOB_INPUT_PARAMS, + StairwayTestUtils.EMPTY_WORKING_MAP, + StairwayTestUtils.TIME_SUBMITTED_1, + null); + + // a completed job should have a completed time, otherwise it's an error + assertThrows( + InvalidResultStateException.class, + () -> JobApiUtils.mapFlightStateToApiJobReport(flightState)); + } + + @Test + void testMapFlightStateToApiJobReportSucceededWithStatusCode() { + // Ensure the custom status code in the working map gets extracted and used + HttpStatus httpStatus = HttpStatus.I_AM_A_TEAPOT; // status code 418 + FlightMap flightMapWithStatusCode = new FlightMap(); + flightMapWithStatusCode.put(JobMapKeys.STATUS_CODE.getKeyName(), httpStatus); + + FlightState flightState = + StairwayTestUtils.constructFlightStateWithStatusAndId( + FlightStatus.SUCCESS, + TestUtils.TEST_NEW_UUID, + StairwayTestUtils.CREATE_JOB_INPUT_PARAMS, + flightMapWithStatusCode, + StairwayTestUtils.TIME_SUBMITTED_1, + StairwayTestUtils.TIME_COMPLETED_1); + + ApiJobReport apiJobReport = JobApiUtils.mapFlightStateToApiJobReport(flightState); + + assertEquals( + "SUCCEEDED", apiJobReport.getStatus().name()); // "SUCCESS" gets mapped to "SUCCEEDED" + assertEquals(418, apiJobReport.getStatusCode()); + } + + @Test + void testMapFlightStateToApiJobReportFailed() { + FlightState flightState = + StairwayTestUtils.constructFlightStateWithStatusAndId( + FlightStatus.ERROR, TestUtils.TEST_NEW_UUID); + flightState.setException(new InternalStairwayException("some message")); + + ApiJobReport apiJobReport = JobApiUtils.mapFlightStateToApiJobReport(flightState); + + assertEquals(TestUtils.TEST_NEW_UUID.toString(), apiJobReport.getId()); + assertEquals("FAILED", apiJobReport.getStatus().name()); // ERROR gets mapped to FAILED + // InternalServerError is a 500 + assertEquals(500, apiJobReport.getStatusCode()); + } + + @Test + void testMapFlightStateToApiJobReportFailedMissingException() { + FlightState flightState = + StairwayTestUtils.constructFlightStateWithStatusAndId( + FlightStatus.ERROR, + TestUtils.TEST_NEW_UUID, + StairwayTestUtils.CREATE_JOB_INPUT_PARAMS, + StairwayTestUtils.EMPTY_WORKING_MAP, + StairwayTestUtils.TIME_SUBMITTED_1, + StairwayTestUtils.TIME_COMPLETED_1); + + assertThrows( + InvalidResultStateException.class, + () -> JobApiUtils.mapFlightStateToApiJobReport(flightState)); + } + + @Test + void testMapFlightStateToApiJobReportRunning() { + FlightState flightState = + StairwayTestUtils.constructFlightStateWithStatusAndId( + FlightStatus.RUNNING, TestUtils.TEST_NEW_UUID); + + ApiJobReport apiJobReport = JobApiUtils.mapFlightStateToApiJobReport(flightState); + + assertEquals(TestUtils.TEST_NEW_UUID.toString(), apiJobReport.getId()); + assertEquals(StairwayTestUtils.TEST_DESCRIPTION, apiJobReport.getDescription()); + assertEquals("RUNNING", apiJobReport.getStatus().name()); + assertNull(apiJobReport.getCompleted()); + assertEquals("", apiJobReport.getResultURL()); + assertEquals(202, apiJobReport.getStatusCode()); + } + + // the following tests are effectively tests of mapFlightStatusToApi(), which is private + + @Test + void testMapFlightStateToApiJobReportRunningQueued() { + FlightState flightState = + StairwayTestUtils.constructFlightStateWithStatusAndId( + FlightStatus.QUEUED, TestUtils.TEST_NEW_UUID); + + ApiJobReport apiJobReport = JobApiUtils.mapFlightStateToApiJobReport(flightState); + + assertEquals("RUNNING", apiJobReport.getStatus().name()); + assertNull(apiJobReport.getCompleted()); + assertEquals(202, apiJobReport.getStatusCode()); + } + + @Test + void testMapFlightStateToApiJobReportRunningWaiting() { + FlightState flightState = + StairwayTestUtils.constructFlightStateWithStatusAndId( + FlightStatus.WAITING, TestUtils.TEST_NEW_UUID); + + ApiJobReport apiJobReport = JobApiUtils.mapFlightStateToApiJobReport(flightState); + + assertEquals("RUNNING", apiJobReport.getStatus().name()); + assertNull(apiJobReport.getCompleted()); + assertEquals(202, apiJobReport.getStatusCode()); + } + + @Test + void testMapFlightStateToApiJobReportRunningReady() { + FlightState flightState = + StairwayTestUtils.constructFlightStateWithStatusAndId( + FlightStatus.READY, TestUtils.TEST_NEW_UUID); + + ApiJobReport apiJobReport = JobApiUtils.mapFlightStateToApiJobReport(flightState); + + assertEquals("RUNNING", apiJobReport.getStatus().name()); + assertNull(apiJobReport.getCompleted()); + assertEquals(202, apiJobReport.getStatusCode()); + } + + @Test + void testMapFlightStateToApiJobReportRunningReadyToRestart() { + FlightState flightState = + StairwayTestUtils.constructFlightStateWithStatusAndId( + FlightStatus.READY_TO_RESTART, TestUtils.TEST_NEW_UUID); + + ApiJobReport apiJobReport = JobApiUtils.mapFlightStateToApiJobReport(flightState); + + assertEquals("RUNNING", apiJobReport.getStatus().name()); + assertNull(apiJobReport.getCompleted()); + assertEquals(202, apiJobReport.getStatusCode()); + } + + @Test + void testMapFlightStateToApiJobReportFailedFatal() { + FlightState flightState = + StairwayTestUtils.constructFlightStateWithStatusAndId( + FlightStatus.FATAL, TestUtils.TEST_NEW_UUID); + flightState.setException(new InternalStairwayException("some message")); + + ApiJobReport apiJobReport = JobApiUtils.mapFlightStateToApiJobReport(flightState); + + assertEquals("FAILED", apiJobReport.getStatus().name()); + assertEquals(500, apiJobReport.getStatusCode()); + } + + @Test + void testBuildApiErrorReportErrorReportExceptionCustomStatus() { + String errorMessage = "some message"; + ErrorReportException exception = + new ErrorReportException(errorMessage, null, HttpStatus.I_AM_A_TEAPOT) {}; + + ApiErrorReport apiErrorReport = JobApiUtils.buildApiErrorReport(exception); + + assertEquals(errorMessage, apiErrorReport.getMessage()); + assertEquals(418, apiErrorReport.getStatusCode()); + assertTrue(apiErrorReport.getCauses().isEmpty()); + } + + @Test + void testBuildApiErrorReportErrorReportExceptionCustomStatusWithCauses() { + String errorMessage = "some message"; + List causes = List.of("cause 1", "cause 2"); + ErrorReportException exception = + new ErrorReportException(errorMessage, causes, HttpStatus.I_AM_A_TEAPOT) {}; + + ApiErrorReport apiErrorReport = JobApiUtils.buildApiErrorReport(exception); + + assertEquals(errorMessage, apiErrorReport.getMessage()); + assertEquals(418, apiErrorReport.getStatusCode()); + assertEquals(causes, apiErrorReport.getCauses()); + } + + @Test + void testBuildApiErrorReport() { + String errorMessage = "some message"; + InternalStairwayException exception = new InternalStairwayException(errorMessage); + + ApiErrorReport apiErrorReport = JobApiUtils.buildApiErrorReport(exception); + + assertEquals(errorMessage, apiErrorReport.getMessage()); + assertEquals(500, apiErrorReport.getStatusCode()); + assertTrue(apiErrorReport.getCauses().isEmpty()); + } +} diff --git a/service/src/test/java/bio/terra/pipelines/controller/JobsApiControllerTest.java b/service/src/test/java/bio/terra/pipelines/controller/JobsApiControllerTest.java index e0b47a6b..7be8dada 100644 --- a/service/src/test/java/bio/terra/pipelines/controller/JobsApiControllerTest.java +++ b/service/src/test/java/bio/terra/pipelines/controller/JobsApiControllerTest.java @@ -13,12 +13,10 @@ import bio.terra.pipelines.app.configuration.external.SamConfiguration; import bio.terra.pipelines.app.controller.GlobalExceptionHandler; import bio.terra.pipelines.app.controller.JobsApiController; -import bio.terra.pipelines.common.utils.PipelinesEnum; import bio.terra.pipelines.db.exception.ImputationJobNotFoundException; import bio.terra.pipelines.dependencies.sam.SamService; import bio.terra.pipelines.dependencies.stairway.JobService; import bio.terra.pipelines.dependencies.stairway.exception.JobUnauthorizedException; -import bio.terra.pipelines.dependencies.stairway.model.EnumeratedJob; import bio.terra.pipelines.dependencies.stairway.model.EnumeratedJobs; import bio.terra.pipelines.generated.model.ApiGetJobsResponse; import bio.terra.pipelines.generated.model.ApiJobReport; @@ -27,11 +25,9 @@ import bio.terra.pipelines.testutils.MockMvcUtils; import bio.terra.pipelines.testutils.StairwayTestUtils; import bio.terra.pipelines.testutils.TestUtils; -import bio.terra.stairway.FlightMap; import bio.terra.stairway.FlightState; import bio.terra.stairway.FlightStatus; import com.fasterxml.jackson.databind.ObjectMapper; -import java.time.Instant; import java.util.*; import javax.servlet.http.HttpServletRequest; import org.junit.jupiter.api.BeforeEach; @@ -58,41 +54,6 @@ class JobsApiControllerTest { @Autowired private MockMvc mockMvc; private final SamUser testUser = MockMvcUtils.TEST_SAM_USER; private final String testUserId = testUser.getSubjectId(); - private final PipelinesEnum pipelineId = PipelinesEnum.IMPUTATION; - private final String pipelineVersion = TestUtils.TEST_PIPELINE_VERSION_1; - // should be updated once we do more thinking on what this will look like - private final Object pipelineInputs = Collections.emptyMap(); - private final Instant timeSubmittedOne = Instant.now(); - private final Instant timeSubmittedTwo = Instant.now(); - private final Instant timeCompletedOne = Instant.now(); - private final Instant timeCompletedTwo = Instant.now(); - private final UUID jobIdOkDone = TestUtils.TEST_NEW_UUID; - private final UUID secondJobId = UUID.randomUUID(); - private final FlightMap createJobInputParameters = - StairwayTestUtils.constructCreateJobInputs( - pipelineId, pipelineVersion, testUserId, pipelineInputs); - private final FlightMap createJobWorkingMap = new FlightMap(); - private final FlightState flightStateDoneSuccess = - StairwayTestUtils.constructFlightStateWithStatusAndId( - FlightStatus.SUCCESS, - jobIdOkDone, - createJobInputParameters, - createJobWorkingMap, - timeSubmittedOne, - timeCompletedOne); - private final FlightState secondFlightStateDoneSuccess = - StairwayTestUtils.constructFlightStateWithStatusAndId( - FlightStatus.SUCCESS, - secondJobId, - createJobInputParameters, - createJobWorkingMap, - timeSubmittedTwo, - timeCompletedTwo); - - private final EnumeratedJob jobDoneSuccess = - new EnumeratedJob().flightState(flightStateDoneSuccess); - private final EnumeratedJob secondJobDoneSuccess = - new EnumeratedJob().flightState(secondFlightStateDoneSuccess); @BeforeEach void beforeEach() { @@ -101,7 +62,9 @@ void beforeEach() { @Test void testGetJobOk() throws Exception { - when(jobServiceMock.retrieveJob(jobIdOkDone, testUserId)).thenReturn(flightStateDoneSuccess); + UUID jobIdOkDone = TestUtils.TEST_NEW_UUID; + when(jobServiceMock.retrieveJob(jobIdOkDone, testUserId)) + .thenReturn(StairwayTestUtils.FLIGHT_STATE_DONE_SUCCESS_1); MvcResult result = mockMvc @@ -124,10 +87,11 @@ void testGetErrorJobOk() throws Exception { StairwayTestUtils.constructFlightStateWithStatusAndId( FlightStatus.ERROR, jobId, - createJobInputParameters, - createJobWorkingMap, - timeSubmittedOne, - timeCompletedOne); + StairwayTestUtils.CREATE_JOB_INPUT_PARAMS, + StairwayTestUtils.EMPTY_WORKING_MAP, + StairwayTestUtils.TIME_SUBMITTED_1, + StairwayTestUtils.TIME_COMPLETED_1); + flightStateDoneError.setException(new Exception("Test exception")); when(jobServiceMock.retrieveJob(jobId, testUserId)).thenReturn(flightStateDoneError); @@ -180,8 +144,7 @@ void testGetJob_badId() throws Exception { @Test void testGetMultipleJobs() throws Exception { - EnumeratedJobs bothJobs = - new EnumeratedJobs().results(List.of(jobDoneSuccess, secondJobDoneSuccess)).totalResults(2); + EnumeratedJobs bothJobs = StairwayTestUtils.ENUMERATED_JOBS; // the mocks when(jobServiceMock.enumerateJobs(testUser.getSubjectId(), 10, null, null)) diff --git a/service/src/test/java/bio/terra/pipelines/controller/PipelinesApiControllerTest.java b/service/src/test/java/bio/terra/pipelines/controller/PipelinesApiControllerTest.java index 08a0c1cf..48f3ea08 100644 --- a/service/src/test/java/bio/terra/pipelines/controller/PipelinesApiControllerTest.java +++ b/service/src/test/java/bio/terra/pipelines/controller/PipelinesApiControllerTest.java @@ -28,6 +28,7 @@ import bio.terra.pipelines.testutils.MockMvcUtils; import bio.terra.pipelines.testutils.StairwayTestUtils; import bio.terra.pipelines.testutils.TestUtils; +import bio.terra.stairway.FlightState; import bio.terra.stairway.FlightStatus; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -339,10 +340,10 @@ void testGetPipelineJobs() throws Exception { .flightState( StairwayTestUtils.constructFlightStateWithStatusAndId( FlightStatus.SUCCESS, jobId2)); - EnumeratedJob job3Error = - new EnumeratedJob() - .flightState( - StairwayTestUtils.constructFlightStateWithStatusAndId(FlightStatus.ERROR, jobId3)); + FlightState flightStateError = + StairwayTestUtils.constructFlightStateWithStatusAndId(FlightStatus.ERROR, jobId3); + flightStateError.setException(new Exception("Test exception")); + EnumeratedJob job3Error = new EnumeratedJob().flightState(flightStateError); EnumeratedJobs allJobs = new EnumeratedJobs().results(List.of(job1Running, job2Success, job3Error)).totalResults(3); diff --git a/service/src/test/java/bio/terra/pipelines/testutils/StairwayTestUtils.java b/service/src/test/java/bio/terra/pipelines/testutils/StairwayTestUtils.java index 44b5ab6d..55d9fe44 100644 --- a/service/src/test/java/bio/terra/pipelines/testutils/StairwayTestUtils.java +++ b/service/src/test/java/bio/terra/pipelines/testutils/StairwayTestUtils.java @@ -5,6 +5,8 @@ import bio.terra.pipelines.common.utils.PipelinesEnum; import bio.terra.pipelines.dependencies.stairway.JobMapKeys; +import bio.terra.pipelines.dependencies.stairway.model.EnumeratedJob; +import bio.terra.pipelines.dependencies.stairway.model.EnumeratedJobs; import bio.terra.pipelines.stairway.RunImputationJobFlightMapKeys; import bio.terra.stairway.*; import bio.terra.stairway.exception.DatabaseOperationException; @@ -12,6 +14,7 @@ import bio.terra.stairway.exception.StairwayExecutionException; import java.time.Instant; import java.util.HashMap; +import java.util.List; import java.util.UUID; import java.util.concurrent.TimeUnit; import org.slf4j.Logger; @@ -23,6 +26,49 @@ public class StairwayTestUtils { private StairwayTestUtils() {} + public static final Instant TIME_SUBMITTED_1 = Instant.parse("2024-01-01T00:00:00.00Z"); + public static final Instant TIME_SUBMITTED_2 = Instant.parse("2024-01-02T01:00:00.00Z"); + public static final Instant TIME_COMPLETED_1 = Instant.parse("2024-01-01T00:30:00.00Z"); + public static final Instant TIME_COMPLETED_2 = Instant.parse("2024-01-02T01:30:00.00Z"); + public static final FlightMap CREATE_JOB_INPUT_PARAMS = + StairwayTestUtils.constructCreateJobInputs( + TestUtils.TEST_PIPELINE_1_ENUM, + TestUtils.TEST_PIPELINE_VERSION_1, + TestUtils.TEST_USER_ID_1, + TestUtils.TEST_PIPELINE_INPUTS); + public static final FlightMap EMPTY_WORKING_MAP = new FlightMap(); + public static final String TEST_DESCRIPTION = "Test Job Description"; + + public static final FlightState FLIGHT_STATE_DONE_SUCCESS_1 = + StairwayTestUtils.constructFlightStateWithStatusAndId( + FlightStatus.SUCCESS, + TestUtils.TEST_NEW_UUID, + CREATE_JOB_INPUT_PARAMS, + EMPTY_WORKING_MAP, + TIME_SUBMITTED_1, + TIME_COMPLETED_1); + public static final FlightState FLIGHT_STATE_DONE_SUCCESS_2 = + StairwayTestUtils.constructFlightStateWithStatusAndId( + FlightStatus.SUCCESS, + TestUtils.TEST_NEW_UUID_2, + CREATE_JOB_INPUT_PARAMS, + EMPTY_WORKING_MAP, + TIME_SUBMITTED_2, + TIME_COMPLETED_2); + + public static final String PAGE_TOKEN = "foo"; + + public static final EnumeratedJob ENUMERATED_JOB_DONE_SUCCESS_1 = + new EnumeratedJob().flightState(FLIGHT_STATE_DONE_SUCCESS_1); + public static final EnumeratedJob ENUMERATED_JOB_DONE_SUCCESS_2 = + new EnumeratedJob().flightState(FLIGHT_STATE_DONE_SUCCESS_2); + + public static final EnumeratedJobs ENUMERATED_JOBS = + new EnumeratedJobs() + .results(List.of(ENUMERATED_JOB_DONE_SUCCESS_1, ENUMERATED_JOB_DONE_SUCCESS_2)) + .totalResults(2) + .pageToken(PAGE_TOKEN); + /** * Submits the flight and block until Stairway completes it by polling regularly until the timeout * is reached. @@ -91,6 +137,7 @@ public static FlightMap constructCreateJobInputs( Object pipelineInputs) { inputParameters.put(JobMapKeys.USER_ID.getKeyName(), userId); inputParameters.put(JobMapKeys.PIPELINE_ID.getKeyName(), pipelineId); + inputParameters.put(JobMapKeys.DESCRIPTION.getKeyName(), TEST_DESCRIPTION); inputParameters.put(RunImputationJobFlightMapKeys.PIPELINE_VERSION, pipelineVersion); inputParameters.put(RunImputationJobFlightMapKeys.PIPELINE_INPUTS, pipelineInputs); @@ -110,7 +157,7 @@ public static FlightMap constructCreateJobInputs(FlightMap inputParameters) { public static FlightState constructFlightStateWithStatusAndId( FlightStatus flightStatus, UUID flightId) { FlightMap resultMap = new FlightMap(); - FlightMap inputParameters = new FlightMap(); + FlightMap inputParameters = constructCreateJobInputs(new FlightMap()); Instant timeSubmitted = Instant.now(); Instant timeCompleted = Instant.now(); return constructFlightStateWithStatusAndId( @@ -144,9 +191,6 @@ public static FlightState constructFlightStateWithStatusAndId( if (flightStatus == SUCCESS || flightStatus == ERROR || flightStatus == FATAL) { flightState.setCompleted(completedTime); } - if (flightStatus == ERROR) { - flightState.setException(new Exception("Test exception")); - } return flightState; } } diff --git a/service/src/test/java/bio/terra/pipelines/testutils/TestUtils.java b/service/src/test/java/bio/terra/pipelines/testutils/TestUtils.java index 07937179..d79963ab 100644 --- a/service/src/test/java/bio/terra/pipelines/testutils/TestUtils.java +++ b/service/src/test/java/bio/terra/pipelines/testutils/TestUtils.java @@ -46,6 +46,8 @@ public class TestUtils { public static final UUID TEST_NEW_UUID = UUID.fromString("deadbeef-dead-beef-aaaa-beefdeadbeef"); + public static final UUID TEST_NEW_UUID_2 = + UUID.fromString("deadbeef-dead-beef-bbbb-beefdeadbeef"); public static final String TEST_STATUS = "TEST STATUS"; public static final Object TEST_PIPELINE_INPUTS = From 033f00d3c20e16db6ad611c89fb4a7c5c9a5c4b4 Mon Sep 17 00:00:00 2001 From: Morgan Taylor Date: Mon, 29 Jan 2024 14:47:38 -0500 Subject: [PATCH 2/2] remove public modifier --- .../java/bio/terra/pipelines/controller/JobApiUtilsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/src/test/java/bio/terra/pipelines/controller/JobApiUtilsTest.java b/service/src/test/java/bio/terra/pipelines/controller/JobApiUtilsTest.java index b804ea6a..93df8768 100644 --- a/service/src/test/java/bio/terra/pipelines/controller/JobApiUtilsTest.java +++ b/service/src/test/java/bio/terra/pipelines/controller/JobApiUtilsTest.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpStatus; -public class JobApiUtilsTest { +class JobApiUtilsTest { @Test void testMapEnumeratedJobsToApi() {