diff --git a/src/integrationTest/java/uk/gov/hmcts/darts/arm/client/ArmRpoClientIntTest.java b/src/integrationTest/java/uk/gov/hmcts/darts/arm/client/ArmRpoClientIntTest.java index cf04e6b14c..10db370b5d 100644 --- a/src/integrationTest/java/uk/gov/hmcts/darts/arm/client/ArmRpoClientIntTest.java +++ b/src/integrationTest/java/uk/gov/hmcts/darts/arm/client/ArmRpoClientIntTest.java @@ -1,234 +1,206 @@ package uk.gov.hmcts.darts.arm.client; import com.github.tomakehurst.wiremock.client.WireMock; -import org.junit.jupiter.api.Disabled; +import com.github.tomakehurst.wiremock.matching.RequestPatternBuilder; +import lombok.AllArgsConstructor; +import org.apache.commons.io.IOUtils; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.skyscreamer.jsonassert.JSONAssert; +import org.skyscreamer.jsonassert.JSONCompareMode; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; import org.springframework.test.context.TestPropertySource; +import uk.gov.hmcts.darts.arm.client.model.rpo.CreateExportBasedOnSearchResultsTableRequest; +import uk.gov.hmcts.darts.arm.client.model.rpo.IndexesByMatterIdRequest; +import uk.gov.hmcts.darts.arm.client.model.rpo.MasterIndexFieldByRecordClassSchemaRequest; +import uk.gov.hmcts.darts.arm.client.model.rpo.ProductionOutputFilesRequest; +import uk.gov.hmcts.darts.arm.client.model.rpo.RemoveProductionRequest; +import uk.gov.hmcts.darts.arm.client.model.rpo.SaveBackgroundSearchRequest; import uk.gov.hmcts.darts.arm.client.model.rpo.StorageAccountRequest; +import uk.gov.hmcts.darts.test.common.TestUtils; import uk.gov.hmcts.darts.testutils.IntegrationBaseWithWiremock; +import java.io.IOException; +import java.util.List; +import java.util.function.BiFunction; +import java.util.stream.Stream; + import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; +import static com.github.tomakehurst.wiremock.client.WireMock.getRequestedFor; import static com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor; import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; import static com.github.tomakehurst.wiremock.client.WireMock.verify; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.springframework.http.HttpHeaders.AUTHORIZATION; import static org.springframework.http.HttpHeaders.CONTENT_TYPE; import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; -import static org.springframework.test.util.AssertionErrors.assertEquals; @TestPropertySource(properties = { "darts.storage.arm-api.url=http://localhost:${wiremock.server.port}" }) class ArmRpoClientIntTest extends IntegrationBaseWithWiremock { - private static final String GET_RECORD_MANAGEMENT_MATTER_PATH = "/api/v1/getRecordManagementMatter"; + private static final String BASE_JSON_DIRECTORY = "tests/arm/client/ArmRpoClientIntTest/"; + private static final String MOCK_RESPONSE_DIRECTORY = BASE_JSON_DIRECTORY + "mocks/"; + private static final String EXPECTED_RESPONSE_DIRECTORY = BASE_JSON_DIRECTORY + "expectedResponse/"; + + private static final String URL_PREFIX = "/api/v1/"; + + private static final String GET_RECORD_MANAGEMENT_MATTER_PATH = "/api/v1/getRecordManagementMatter"; private static final String GET_STORAGE_ACCOUNTS_PATH = "/api/v1/getStorageAccounts"; @Autowired private ArmRpoClient armRpoClient; - @Disabled("This test is failing other wiremock tests") - @Test - void getRecordManagementMatterShouldSucceedIfServerReturns200Success() { - // given - var bearerAuth = "Bearer some-token"; - stubFor( - WireMock.post(urlEqualTo(GET_RECORD_MANAGEMENT_MATTER_PATH)) - .willReturn( - aResponse() - .withHeader("Content-type", "application/json") - .withBody(""" - { - "recordManagementMatter": { - "matterCategory": 3, - "matterID": "cb70c7fa-8972-4400-af1d-ff5dd76d2104", - "name": "Records Management", - "isQuickSearch": false, - "isUsedForRM": true, - "description": "Records Management", - "createdDate": "2022-12-14T08:50:55.75+00:00", - "type": 1, - "status": 0, - "userID": null, - "backgroundJobID": null, - "isClosed": false - }, - "status": 200, - "demoMode": false, - "isError": false, - "responseStatus": 0, - "responseStatusMessages": null, - "exception": null, - "message": null - } - """ - ) - .withStatus(200))); - // when - var getRecordManagementMatterResponse = armRpoClient.getRecordManagementMatter(bearerAuth); - - // then - verify(postRequestedFor(urlEqualTo(GET_RECORD_MANAGEMENT_MATTER_PATH)) - .withHeader(AUTHORIZATION, equalTo(bearerAuth)) - .withHeader(CONTENT_TYPE, equalTo(APPLICATION_JSON_VALUE)) + private static Stream genericArmRpoClientTestArguments() { + return Stream.of( + Arguments.of("getRecordManagementMatter", (BiFunction) (armRpoClient, bearerAuth) -> { + return new ClientCallable(null, armRpoClient.getRecordManagementMatter(bearerAuth)); + }), + Arguments.of("getStorageAccounts", (BiFunction) (armRpoClient, bearerAuth) -> { + StorageAccountRequest request = StorageAccountRequest.builder() + .onlyKeyAccessType(false) + .storageType(1) + .build(); + return new ClientCallable(request, armRpoClient.getStorageAccounts(bearerAuth, request)); + }), + Arguments.of("getMasterIndexFieldByRecordClassSchema", (BiFunction) (armRpoClient, bearerAuth) -> { + MasterIndexFieldByRecordClassSchemaRequest request = MasterIndexFieldByRecordClassSchemaRequest.builder() + .recordClassCode("some-record-class-code") + .isForSearch(true) + .fieldType(1) + .usePaging(true) + .build(); + return new ClientCallable(request, armRpoClient.getMasterIndexFieldByRecordClassSchema(bearerAuth, request)); + }), + Arguments.of("getProfileEntitlements", (BiFunction) (armRpoClient, bearerAuth) -> { + return new ClientCallable(null, armRpoClient.getProfileEntitlementResponse(bearerAuth)); + }), + Arguments.of("addAsyncSearch", (BiFunction) (armRpoClient, bearerAuth) -> { + String request = "{\"request\": \"body\"}"; + return new ClientCallable(request, armRpoClient.addAsyncSearch(bearerAuth, request)); + }), + Arguments.of("getIndexesByMatterId", (BiFunction) (armRpoClient, bearerAuth) -> { + IndexesByMatterIdRequest request = IndexesByMatterIdRequest.builder() + .matterId("matterId") + .build(); + return new ClientCallable(request, armRpoClient.getIndexesByMatterId(bearerAuth, request)); + }), + Arguments.of("SaveBackgroundSearch", (BiFunction) (armRpoClient, bearerAuth) -> { + SaveBackgroundSearchRequest request = SaveBackgroundSearchRequest.builder() + .name("some-name") + .searchId("some-search-id") + .build(); + return new ClientCallable(request, armRpoClient.saveBackgroundSearch(bearerAuth, request)); + }), + Arguments.of("getExtendedSearchesByMatter", (BiFunction) (armRpoClient, bearerAuth) -> { + String request = "{\"request\": \"body\"}"; + return new ClientCallable(request, armRpoClient.getExtendedSearchesByMatter(bearerAuth, request)); + }), + Arguments.of("getProductionOutputFiles", (BiFunction) (armRpoClient, bearerAuth) -> { + ProductionOutputFilesRequest request = ProductionOutputFilesRequest.builder() + .productionId("some-production-id") + .build(); + return new ClientCallable(request, armRpoClient.getProductionOutputFiles(bearerAuth, request)); + }), + Arguments.of("CreateExportBasedOnSearchResultsTable", (BiFunction) (armRpoClient, bearerAuth) -> { + CreateExportBasedOnSearchResultsTableRequest request = CreateExportBasedOnSearchResultsTableRequest.builder() + .core("some-core") + .formFields("some-form-fields") + .searchId("some-search-id") + .searchitemsCount(1) + .headerColumns( + List.of(CreateExportBasedOnSearchResultsTableRequest.HeaderColumn.builder() + .masterIndexField("some-master-index-field") + .displayName("some-display-name") + .propertyName("some-property-name") + .propertyType("some-property-type") + .isMasked(true) + .build()) + ) + .productionName("some-production-name") + .storageAccountId("some-storage-account-id") + .build(); + return new ClientCallable(request, armRpoClient.createExportBasedOnSearchResultsTable(bearerAuth, request)); + }), + Arguments.of("removeProduction", (BiFunction) (armRpoClient, bearerAuth) -> { + RemoveProductionRequest request = RemoveProductionRequest.builder() + .productionId("some-production-id") + .deleteSearch(true) + .build(); + return new ClientCallable(request, armRpoClient.removeProduction(bearerAuth, request)); + }), + Arguments.of("getExtendedProductionsByMatter", (BiFunction) (armRpoClient, bearerAuth) -> { + String request = "{\"request\": \"body\"}"; + return new ClientCallable(request, armRpoClient.getExtendedProductionsByMatter(bearerAuth, request)); + }) ); - - assertEquals("Failed to get matter id", "cb70c7fa-8972-4400-af1d-ff5dd76d2104", - getRecordManagementMatterResponse.getRecordManagementMatter().getMatterId()); } - @Disabled("This test is failing other wiremock tests but works locally") - @Test - void getStorageAccountsShouldSucceedIfServerReturns200Success() { - // given - var bearerAuth = "Bearer some-token"; + @AllArgsConstructor + static class ClientCallable { + Object request; + Object response; + } + + @ParameterizedTest(name = "{0} should succeed when server returns 200") + @MethodSource("genericArmRpoClientTestArguments") + void generic_serverReturns200Success_ShouldSucceed(String suffix, BiFunction callClient) throws IOException { stubFor( - WireMock.post(urlEqualTo(GET_STORAGE_ACCOUNTS_PATH)) + WireMock.post(urlEqualTo(URL_PREFIX + suffix)) .willReturn( aResponse() .withHeader("Content-type", "application/json") - .withBody(""" - { - "indexes": [ - { - "index": { - "indexID": "c19454c6-c378-43c1-ae59-d0d013e30915", - "isGroup": false, - "name": "rm5", - "displayName": "rm5", - "userIndexID": "2f4d6512-64b5-4478-940d-bd29e115591c", - "userID": "8b2a9527-e8e2-4430-8e51-b2af4227ff10", - "azureSearchAccountID": "dac6878a-6269-48de-981d-3f2f43dfddd2", - "indexStatusID": 4, - "notified": false, - "startDate": null, - "endDate": null, - "discoveryStartDate": "2023-11-16T13:53:03.94151+00:00", - "discoveryEndDate": "2023-11-16T14:36:19.5597796+00:00", - "buildStartDate": "2023-11-16T14:37:43.4140026+00:00", - "buildEndDate": "2023-11-16T16:22:19.4438814+00:00", - "resumeStartDate": "2024-07-25T10:56:39.5283925+00:00", - "resumeEndDate": null, - "stoppingStartDate": "2024-07-25T09:21:05.1366667+00:00", - "stoppingEndDate": null, - "createdDate": "2023-11-16T13:52:49.614141+00:00", - "totalTime": 8883.4780311, - "blobCount": 768987, - "blobsProcessed": 768987, - "indexDiscoveryItemsCount": 1, - "indexDiscoveryItemsProcessed": 1, - "exceptionsCount": null, - "indexBlobExceptionsCount": 0, - "indexDiscoveryItemExceptionsCount": null, - "indexBatchJobPartitionsCount": 277, - "indexExceptionBatchPartitionsCount": null, - "indexUpdateBatchPartitionsCount": 299, - "indexUpdateExceptionBatchPartitionsCount": null, - "indexBatchLastJobPartitionsCount": null, - "indexBlobPartitionsCount": 7651, - "indexBlobJobExceptionPartitionsCount": null, - "indexBlobLastJobExceptionPartitionsCount": null, - "indexDiscoveryItemPartitionsCount": 1, - "indexDiscoveryItemExceptionPartitionsCount": null, - "indexJobExceptionPartitionsCount": null, - "indexLastJobExceptionPartitionsCount": null, - "tablePartitionSize": 100, - "updateDate": "2023-11-16T13:52:49.614141+00:00", - "lastJobID": 0, - "jobID": 1, - "indexBlobLastJobID": null, - "indexBlobJobID": 0, - "isContinous": true, - "isPrimary": true, - "isUsedForRM": true, - "continousIndexBlobPartitionsCount": 7935, - "requestSizeLimit": 100, - "skipContentOverLimit": true, - "skipContentIfParserError": true, - "fileSizeLimitToTikaParser": 52428800, - "sortByResultField": false, - "blobContainer": "cloud360", - "continuousIndexBatchSize": 16, - "continousTablePartitionSize": 100, - "isDeleted": false, - "mainQueueProcessPriority": 0, - "secondaryQueueProcessPriority": 1, - "buildBatchesInQueue": 1350, - "buildBatchesProcessed": 1350, - "buildContinuationToken": "0000000000000000276-0000000000000000000", - "buildExceptionContinuationToken": null, - "updateContinuationToken": "0000000000000000298-0000000000000000000", - "updateExceptionContinuationToken": null, - "countOnly": false, - "errorCodes": null, - "esIndexRolloverSize": null, - "esIndexRolloverSizePerShard": 40, - "esIndexNoReplicas": 1, - "esIndexNoShards": 6, - "isDiscoveryCancelled": false, - "indexContinuousLastSavedBlobExceptionPartitionsCount": null, - "continuousExceptionsInProgress": 0, - "preparingContinuousErrorBatches": false, - "schemaUpdated": false, - "discoveryItemsLock": false, - "blobExceptionsStreamUpdateNeeded": false, - "streamIDsToProcess": null, - "indexUpdateBlobPartitionsCount": 315, - "indexUpdateExceptionPartitionsCount": 176, - "indexUpdateExceptionsCount": 822, - "updateBlobCount": 3918, - "updateBlobsProcessed": 3918, - "indexLastSavedUpdateExceptionPartitionsCount": null, - "updateExceptionsInProgress": 0, - "preparingUpdateErrorBatches": false, - "poisonHandlingFailed": false - }, - "isMultiStream": false, - "children": [] - } - ], - "itemsCount": 1, - "status": 200, - "demoMode": false, - "isError": false, - "responseStatus": 0, - "responseStatusMessages": null, - "exception": null, - "message": null - } - """ - ) + .withBody(TestUtils.getContentsFromFile(MOCK_RESPONSE_DIRECTORY + suffix + ".json")) .withStatus(200))); - // when - var getStorageAccountsResponse = armRpoClient.getStorageAccounts(bearerAuth, createStorageAccountRequest()); + String bearerAuth = "Bearer some-token"; - // then - verify(postRequestedFor(urlEqualTo(GET_STORAGE_ACCOUNTS_PATH)) - .withHeader(AUTHORIZATION, equalTo(bearerAuth)) - .withHeader(CONTENT_TYPE, equalTo(APPLICATION_JSON_VALUE)) - ); + ClientCallable clientCallable = callClient.apply(armRpoClient, bearerAuth); + + RequestPatternBuilder requestPatternBuilder = postRequestedFor(urlEqualTo(URL_PREFIX + suffix)) + .withHeader(AUTHORIZATION, equalTo(bearerAuth)) + .withHeader(CONTENT_TYPE, equalTo(APPLICATION_JSON_VALUE)); - assertEquals("Failed to get storage account index name", "rm5", - getStorageAccountsResponse.getDataDetails().getFirst().getId()); - assertEquals("Failed to get storage account index id", "c19454c6-c378-43c1-ae59-d0d013e30915", - getStorageAccountsResponse.getDataDetails().getFirst().getName()); + if (clientCallable.request != null) { + requestPatternBuilder.withRequestBody(equalTo(TestUtils.writeAsString(clientCallable.request))); + } + verify(requestPatternBuilder); + JSONAssert.assertEquals(TestUtils.getContentsFromFile(EXPECTED_RESPONSE_DIRECTORY + suffix + ".json"), + TestUtils.writeAsString(clientCallable.response), + JSONCompareMode.STRICT); } + @Test + void downloadProduction_serverReturns200Success_ShouldSucceed() throws IOException { + String url = "downloadProduction/1234/false"; + String suffix = "downloadProduction"; + stubFor( + WireMock.get(urlEqualTo(URL_PREFIX + url)) + .willReturn( + aResponse() + .withHeader("Content-type", MediaType.APPLICATION_OCTET_STREAM_VALUE) + .withBody(TestUtils.getContentsFromFile(MOCK_RESPONSE_DIRECTORY + suffix + ".csv")) + .withStatus(200))); + String bearerAuth = "Bearer some-token"; + + try (feign.Response response = armRpoClient.downloadProduction(bearerAuth, "1234")) { + RequestPatternBuilder requestPatternBuilder = getRequestedFor(urlEqualTo(URL_PREFIX + url)) + .withHeader(AUTHORIZATION, equalTo(bearerAuth)); - private StorageAccountRequest createStorageAccountRequest() { - return StorageAccountRequest.builder() - .onlyKeyAccessType(false) - .storageType(1) - .build(); + verify(requestPatternBuilder); + assertEquals(TestUtils.getContentsFromFile(EXPECTED_RESPONSE_DIRECTORY + suffix + ".csv"), + IOUtils.toString(response.body().asInputStream())); + } } - } diff --git a/src/integrationTest/java/uk/gov/hmcts/darts/testutils/IntegrationBaseWithWiremock.java b/src/integrationTest/java/uk/gov/hmcts/darts/testutils/IntegrationBaseWithWiremock.java index 1252d150ec..2b8995d2e9 100644 --- a/src/integrationTest/java/uk/gov/hmcts/darts/testutils/IntegrationBaseWithWiremock.java +++ b/src/integrationTest/java/uk/gov/hmcts/darts/testutils/IntegrationBaseWithWiremock.java @@ -1,5 +1,6 @@ package uk.gov.hmcts.darts.testutils; +import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.BeforeEach; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -8,6 +9,7 @@ // port = 0 enables random ports as recommended by Wiremock. Tests will be faster and more reliable @AutoConfigureWireMock(port = 0, files = "file:src/integrationTest/resources/wiremock") +@Slf4j public class IntegrationBaseWithWiremock extends IntegrationBase { @Value("${wiremock.server.port}") @@ -17,10 +19,17 @@ public class IntegrationBaseWithWiremock extends IntegrationBase { protected DartsGatewayStub dartsGateway; @BeforeEach + @SuppressWarnings("PMD.DoNotUseThreads") void setup() { - dartsGateway.clearStubs(); - - // populate the jkws keys endpoint with a global public key - tokenStub.stubExternalJwksKeys(DartsTokenGenerator.getGlobalKey()); + try { + log.info("Wiremock Port: " + wiremockPort); + dartsGateway.clearStubs(); + //Wait required to ensure that the wiremock server is up and running before the tests start + Thread.sleep(2000); + // populate the jkws keys endpoint with a global public key + tokenStub.stubExternalJwksKeys(DartsTokenGenerator.getGlobalKey()); + } catch (Exception e) { + log.error("Error setting up wiremock", e); + } } } \ No newline at end of file diff --git a/src/integrationTest/resources/application-intTest.yaml b/src/integrationTest/resources/application-intTest.yaml index 39ba689930..1c91e4ccad 100644 --- a/src/integrationTest/resources/application-intTest.yaml +++ b/src/integrationTest/resources/application-intTest.yaml @@ -103,10 +103,4 @@ logging: gov: hmcts: darts: DEBUG - config: classpath:logback-test.xml - - darts: - storage: - -wiremock: - reset-mappings-after-each-test: true \ No newline at end of file + config: classpath:logback-test.xml \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/CreateExportBasedOnSearchResultsTable.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/CreateExportBasedOnSearchResultsTable.json new file mode 100644 index 0000000000..dc44ba149f --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/CreateExportBasedOnSearchResultsTable.json @@ -0,0 +1,6 @@ +{ + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0 +} diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/SaveBackgroundSearch.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/SaveBackgroundSearch.json new file mode 100644 index 0000000000..09436c55ce --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/SaveBackgroundSearch.json @@ -0,0 +1,7 @@ +{ + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "isValid": false +} diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/addAsyncSearch.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/addAsyncSearch.json new file mode 100644 index 0000000000..eefac07143 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/addAsyncSearch.json @@ -0,0 +1,7 @@ +{ + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "searchId": "8271f101-8c14-4c41-8865-edc5d8baed99" +} diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/downloadProduction.csv b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/downloadProduction.csv new file mode 100644 index 0000000000..c43f84cda2 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/downloadProduction.csv @@ -0,0 +1 @@ +a1,b2,c3 \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getExtendedProductionsByMatter.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getExtendedProductionsByMatter.json new file mode 100644 index 0000000000..847b461b7c --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getExtendedProductionsByMatter.json @@ -0,0 +1,12 @@ +{ + "itemsCount": 1, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "productions": [ + { + "productionID": "1b6a29d9-a72e-420b-8d69-b8acbeed806a" + } + ] +} diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getExtendedSearchesByMatter.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getExtendedSearchesByMatter.json new file mode 100644 index 0000000000..45a37c82ba --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getExtendedSearchesByMatter.json @@ -0,0 +1,15 @@ +{ + "itemsCount": 1, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "searches": [ + { + "search": { + "name": "DARTS_RPO_2024-08-13", + "totalCount": 5 + } + } + ] +} diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getIndexesByMatterId.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getIndexesByMatterId.json new file mode 100644 index 0000000000..f101018715 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getIndexesByMatterId.json @@ -0,0 +1,14 @@ +{ + "itemsCount": 1, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "indexes": [ + { + "index": { + "indexID": "c19454c6-c378-43c1-ae59-d0d013e30915" + } + } + ] +} diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getMasterIndexFieldByRecordClassSchema.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getMasterIndexFieldByRecordClassSchema.json new file mode 100644 index 0000000000..2ca0e4d5cc --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getMasterIndexFieldByRecordClassSchema.json @@ -0,0 +1,184 @@ +{ + "itemsCount": 25, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "masterIndexFields": [ + { + "propertyName": "record_class", + "propertyType": "string", + "displayName": "Record Class", + "isMasked": false, + "masterIndexFieldID": "200b9c27-b497-4977-82e7-1586b32a5871" + }, + { + "propertyName": "ingestionDate", + "propertyType": "date", + "displayName": "Archived Date", + "isMasked": false, + "masterIndexFieldID": "90ee0e13-8639-4c4a-b542-66b6c8911549" + }, + { + "propertyName": "client_identifier", + "propertyType": "string", + "displayName": "Client Identifier", + "isMasked": false, + "masterIndexFieldID": "a9b8daf2-d9ff-4815-b65a-f6ae2763b92c" + }, + { + "propertyName": "contributor", + "propertyType": "string", + "displayName": "Contributor", + "isMasked": false, + "masterIndexFieldID": "109b6bf1-57a0-48ec-b22e-c7248dc74f91" + }, + { + "propertyName": "recordDate", + "propertyType": "date", + "displayName": "Record Date", + "isMasked": false, + "masterIndexFieldID": "893048bf-1e7c-4811-9abf-00cd77a715cf" + }, + { + "propertyName": "bf_012", + "propertyType": "number", + "displayName": "ObjectId", + "isMasked": false, + "masterIndexFieldID": "fdd0fcbb-da46-4af1-a627-ac255c12bb23" + }, + { + "propertyName": "bf_013", + "propertyType": "number", + "displayName": "ParentId", + "isMasked": false, + "masterIndexFieldID": "1332b6b2-d4b1-4a9a-b13d-f5a08d9cc803" + }, + { + "propertyName": "bf_014", + "propertyType": "number", + "displayName": "Channel", + "isMasked": false, + "masterIndexFieldID": "0eb3adc8-f220-4074-9ad4-64c43313b5c6" + }, + { + "propertyName": "bf_015", + "propertyType": "number", + "displayName": "MaxChannels", + "isMasked": false, + "masterIndexFieldID": "9af92904-442c-44c1-916c-c1ee6d019140" + }, + { + "propertyName": "bf_001", + "propertyType": "string", + "displayName": "ObjectType", + "isMasked": false, + "masterIndexFieldID": "03d413d8-126e-4330-ba76-ff09405c2856" + }, + { + "propertyName": "bf_002", + "propertyType": "string", + "displayName": "CaseNumbers", + "isMasked": false, + "masterIndexFieldID": "2fdfffce-0390-44b0-9b3f-038b790f26ad" + }, + { + "propertyName": "bf_003", + "propertyType": "string", + "displayName": "FileType", + "isMasked": false, + "masterIndexFieldID": "6afc68a3-ea09-478c-ad28-a57b846c4d57" + }, + { + "propertyName": "bf_005", + "propertyType": "string", + "displayName": "Checksum", + "isMasked": false, + "masterIndexFieldID": "5aa6b522-bcee-44d3-95d2-5497a636f387" + }, + { + "propertyName": "bf_006", + "propertyType": "string", + "displayName": "TranscriptRequest", + "isMasked": false, + "masterIndexFieldID": "b885df16-7ce4-404c-a0c6-036d071d6a2f" + }, + { + "propertyName": "bf_007", + "propertyType": "string", + "displayName": "TranscriptType", + "isMasked": false, + "masterIndexFieldID": "7cbc7937-87e6-4f8e-bc7b-de552ca8ed1e" + }, + { + "propertyName": "bf_008", + "propertyType": "string", + "displayName": "TranscriptUrgency", + "isMasked": false, + "masterIndexFieldID": "ad3b574b-f0c7-492e-8a47-c9645b558c09" + }, + { + "propertyName": "bf_009", + "propertyType": "string", + "displayName": "Comments", + "isMasked": false, + "masterIndexFieldID": "1337a236-c482-4a7d-baa3-4875cb484767" + }, + { + "propertyName": "bf_016", + "propertyType": "string", + "displayName": "UploadedBy", + "isMasked": false, + "masterIndexFieldID": "ea88ea00-fb7c-41a3-b0c8-adf2bfb8df18" + }, + { + "propertyName": "bf_004", + "propertyType": "date", + "displayName": "HearingDate", + "isMasked": false, + "masterIndexFieldID": "5865d506-87d9-4733-8efc-026d636793d4" + }, + { + "propertyName": "bf_010", + "propertyType": "date", + "displayName": "CreatedDateTime", + "isMasked": false, + "masterIndexFieldID": "519d88cb-dad2-4c6a-ac3a-b41bc3519c68" + }, + { + "propertyName": "bf_011", + "propertyType": "date", + "displayName": "StartDateTime", + "isMasked": false, + "masterIndexFieldID": "0c5b03b8-86f0-45df-a6ab-17085131b54c" + }, + { + "propertyName": "bf_017", + "propertyType": "date", + "displayName": "EndDateTime", + "isMasked": false, + "masterIndexFieldID": "9fb67f04-5fac-4d41-97ef-ac92267ff0e7" + }, + { + "propertyName": "bf_018", + "propertyType": "date", + "displayName": "PlaceholderDate", + "isMasked": false, + "masterIndexFieldID": "94aadf8a-a13e-4b35-af25-034f01f1f2c2" + }, + { + "propertyName": "bf_019", + "propertyType": "string", + "displayName": "Courthouse", + "isMasked": false, + "masterIndexFieldID": "11dc6223-fd52-4714-950b-d74d721f1dae" + }, + { + "propertyName": "bf_020", + "propertyType": "string", + "displayName": "Courtroom", + "isMasked": false, + "masterIndexFieldID": "ae888318-1500-44f4-92b9-f09824e6ae1f" + } + ] +} diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getProductionOutputFiles.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getProductionOutputFiles.json new file mode 100644 index 0000000000..745d177f52 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getProductionOutputFiles.json @@ -0,0 +1,14 @@ +{ + "itemsCount": 1, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "productionExportFile": [ + { + "productionExportFile": { + "productionExportFileID": "741d78c1-d722-419d-b72c-74f9972ff60e" + } + } + ] +} diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getProfileEntitlements.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getProfileEntitlements.json new file mode 100644 index 0000000000..4fe65c9751 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getProfileEntitlements.json @@ -0,0 +1,13 @@ +{ + "itemsCount": 1, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "entitlements": [ + { + "name": "SRV-DARTS-RW-E", + "entitlementID": "96293900-5082-4051-bbad-c961fb22091d" + } + ] +} diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getRecordManagementMatter.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getRecordManagementMatter.json new file mode 100644 index 0000000000..1249718591 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getRecordManagementMatter.json @@ -0,0 +1,18 @@ +{ + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "recordManagementMatter": { + "matterCategory": 3, + "name": "Records Management", + "description": "Records Management", + "createdDate": "2022-12-14T08:50:55.75Z", + "type": 1, + "status": 0, + "quickSearch": false, + "closed": false, + "matterID": "cb70c7fa-8972-4400-af1d-ff5dd76d2104", + "isUsedForRM": true + } +} diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getStorageAccounts.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getStorageAccounts.json new file mode 100644 index 0000000000..1901bc1ada --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/getStorageAccounts.json @@ -0,0 +1,16 @@ +{ + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "data": [ + { + "id": "aeb01bc8-9292-47a7-88a3-8fc89ebc3e10", + "name": "a360c2x2555blob" + }, + { + "id": "df29511c-76c4-46d4-80c1-9d7f108eb551", + "name": "a360c2x2555json" + } + ] +} diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/removeProduction.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/removeProduction.json new file mode 100644 index 0000000000..dc44ba149f --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/expectedResponse/removeProduction.json @@ -0,0 +1,6 @@ +{ + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0 +} diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/CreateExportBasedOnSearchResultsTable.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/CreateExportBasedOnSearchResultsTable.json new file mode 100644 index 0000000000..ca7feb2e2b --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/CreateExportBasedOnSearchResultsTable.json @@ -0,0 +1,10 @@ +{ + "isValid": false, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "responseStatusMessages": null, + "exception": null, + "message": null +} \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/CreateExportBasedOnSearchResultsTable_searchStillRunning.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/CreateExportBasedOnSearchResultsTable_searchStillRunning.json new file mode 100644 index 0000000000..9efa10363b --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/CreateExportBasedOnSearchResultsTable_searchStillRunning.json @@ -0,0 +1,15 @@ +{ + "isValid": false, + "status": 400, + "demoMode": false, + "isError": true, + "responseStatus": 2, + "responseStatusMessages": [ + { + "message": "createExportBasedOnSearchResultsTable: The search is still running and cannot export as csv. Please check the search page for its status", + "isError": true + } + ], + "exception": null, + "message": "createExportBasedOnSearchResultsTable: The search is still running and cannot export as csv. Please check the search page for its status" +} \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/SaveBackgroundSearch.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/SaveBackgroundSearch.json new file mode 100644 index 0000000000..ca7feb2e2b --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/SaveBackgroundSearch.json @@ -0,0 +1,10 @@ +{ + "isValid": false, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "responseStatusMessages": null, + "exception": null, + "message": null +} \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/addAsyncSearch.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/addAsyncSearch.json new file mode 100644 index 0000000000..63fcdc4d65 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/addAsyncSearch.json @@ -0,0 +1,10 @@ +{ + "searchId":"8271f101-8c14-4c41-8865-edc5d8baed99", + "status":200, + "demoMode":false, + "isError":false, + "responseStatus":0, + "responseStatusMessages":null, + "exception":null, + "message":null +} \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/downloadProduction.csv b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/downloadProduction.csv new file mode 100644 index 0000000000..c43f84cda2 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/downloadProduction.csv @@ -0,0 +1 @@ +a1,b2,c3 \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getExtendedProductionsByMatter.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getExtendedProductionsByMatter.json new file mode 100644 index 0000000000..6cf611a627 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getExtendedProductionsByMatter.json @@ -0,0 +1,88 @@ +{ + "productions": [ + { + "production": { + "edrmFile": false, + "csvSummary": true, + "binary": false, + "manifest": false, + "productionID": "1b6a29d9-a72e-420b-8d69-b8acbeed806a", + "matterID": "cb70c7fa-8972-4400-af1d-ff5dd76d2104", + "name": "DARTS_RPO_2024-08-13_CSV", + "description": "search grid results", + "status": 4, + "errorCode": 0, + "errorDescr": null, + "bates": false, + "exportType": 32, + "nativeMsgToPst": false, + "flattenFolderHierarchy": false, + "nativeMaxContainerSize": 1000, + "nativeMaxItemsPerContainer": 500000, + "nativeIncludeJournalReport": false, + "pdfSearchablePDF": false, + "pdfConsolidateItems": false, + "pdfPageBreak": false, + "pdfItemsPerExportFile": 0, + "lastUpdateTime": "2024-08-13T16:50:21.1505806+00:00", + "startProductionTime": "2024-08-13T16:50:15.4091127+00:00", + "endProductionTime": "2024-08-13T16:50:21.1592576+00:00", + "createdDate": "2024-08-13T16:50:12.6428988+00:00", + "custodianID": 7812, + "itemsCount": 5, + "estimateCount": 5, + "processedItemsCount": 5, + "progressItemsCount": 5, + "filesSummaryFile": 2, + "outputContent": 0, + "storageType": 1, + "storageAccountID": "aeb01bc8-9292-47a7-88a3-8fc89ebc3e10", + "isStopped": false, + "indexIsDeleted": false, + "targetType": null, + "targetSmtp": null, + "autoStartExport": true, + "deleteSearch": false, + "dedupItems": false, + "exportMetadata": "[{\"MasterIndexField\":\"200b9c27-b497-4977-82e7-1586b32a5871\",\"DisplayName\":\"Record Class\",\"PropertyName\":\"record_class\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"90ee0e13-8639-4c4a-b542-66b6c8911549\",\"DisplayName\":\"Archived Date\",\"PropertyName\":\"ingestionDate\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"a9b8daf2-d9ff-4815-b65a-f6ae2763b92c\",\"DisplayName\":\"Client Identifier\",\"PropertyName\":\"client_identifier\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"109b6bf1-57a0-48ec-b22e-c7248dc74f91\",\"DisplayName\":\"Contributor\",\"PropertyName\":\"contributor\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"893048bf-1e7c-4811-9abf-00cd77a715cf\",\"DisplayName\":\"Record Date\",\"PropertyName\":\"recordDate\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"fdd0fcbb-da46-4af1-a627-ac255c12bb23\",\"DisplayName\":\"ObjectId\",\"PropertyName\":\"bf_012\",\"PropertyType\":\"number\",\"IsMasked\":false},{\"MasterIndexField\":\"1332b6b2-d4b1-4a9a-b13d-f5a08d9cc803\",\"DisplayName\":\"ParentId\",\"PropertyName\":\"bf_013\",\"PropertyType\":\"number\",\"IsMasked\":false},{\"MasterIndexField\":\"0eb3adc8-f220-4074-9ad4-64c43313b5c6\",\"DisplayName\":\"Channel\",\"PropertyName\":\"bf_014\",\"PropertyType\":\"number\",\"IsMasked\":false},{\"MasterIndexField\":\"9af92904-442c-44c1-916c-c1ee6d019140\",\"DisplayName\":\"MaxChannels\",\"PropertyName\":\"bf_015\",\"PropertyType\":\"number\",\"IsMasked\":false},{\"MasterIndexField\":\"03d413d8-126e-4330-ba76-ff09405c2856\",\"DisplayName\":\"ObjectType\",\"PropertyName\":\"bf_001\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"2fdfffce-0390-44b0-9b3f-038b790f26ad\",\"DisplayName\":\"CaseNumbers\",\"PropertyName\":\"bf_002\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"6afc68a3-ea09-478c-ad28-a57b846c4d57\",\"DisplayName\":\"FileType\",\"PropertyName\":\"bf_003\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"5aa6b522-bcee-44d3-95d2-5497a636f387\",\"DisplayName\":\"Checksum\",\"PropertyName\":\"bf_005\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"b885df16-7ce4-404c-a0c6-036d071d6a2f\",\"DisplayName\":\"TranscriptRequest\",\"PropertyName\":\"bf_006\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"7cbc7937-87e6-4f8e-bc7b-de552ca8ed1e\",\"DisplayName\":\"TranscriptType\",\"PropertyName\":\"bf_007\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"ad3b574b-f0c7-492e-8a47-c9645b558c09\",\"DisplayName\":\"TranscriptUrgency\",\"PropertyName\":\"bf_008\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"1337a236-c482-4a7d-baa3-4875cb484767\",\"DisplayName\":\"Comments\",\"PropertyName\":\"bf_009\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"ea88ea00-fb7c-41a3-b0c8-adf2bfb8df18\",\"DisplayName\":\"UploadedBy\",\"PropertyName\":\"bf_016\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"5865d506-87d9-4733-8efc-026d636793d4\",\"DisplayName\":\"HearingDate\",\"PropertyName\":\"bf_004\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"519d88cb-dad2-4c6a-ac3a-b41bc3519c68\",\"DisplayName\":\"CreatedDateTime\",\"PropertyName\":\"bf_010\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"0c5b03b8-86f0-45df-a6ab-17085131b54c\",\"DisplayName\":\"StartDateTime\",\"PropertyName\":\"bf_011\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"9fb67f04-5fac-4d41-97ef-ac92267ff0e7\",\"DisplayName\":\"EndDateTime\",\"PropertyName\":\"bf_017\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"94aadf8a-a13e-4b35-af25-034f01f1f2c2\",\"DisplayName\":\"PlaceholderDate\",\"PropertyName\":\"bf_018\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"11dc6223-fd52-4714-950b-d74d721f1dae\",\"DisplayName\":\"Courthouse\",\"PropertyName\":\"bf_019\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"ae888318-1500-44f4-92b9-f09824e6ae1f\",\"DisplayName\":\"Courtroom\",\"PropertyName\":\"bf_020\",\"PropertyType\":\"string\",\"IsMasked\":false}]", + "exportLocation": null, + "totalSize": null + }, + "productionID": "1b6a29d9-a72e-420b-8d69-b8acbeed806a", + "exportType": 32, + "matterID": "cb70c7fa-8972-4400-af1d-ff5dd76d2104", + "matterName": "Records Management", + "name": "DARTS_RPO_2024-08-13_CSV", + "description": "search grid results", + "status": 4, + "errorCode": 0, + "startProductionTime": "2024-08-13T16:50:15.4091127+00:00", + "endProductionTime": "2024-08-13T16:50:21.1592576+00:00", + "userName": "Id: 7812", + "itemsCount": 5, + "estimateCount": 5, + "itemsSize": 0, + "progress": 100.0, + "selectionCriteria": [ + 2 + ], + "filesSummaryFile": 2, + "storageAccountId": "aeb01bc8-9292-47a7-88a3-8fc89ebc3e10", + "storageType": 1, + "isIndexDeleted": false, + "targetSMTP": null, + "targetType": null, + "exportLocation": null, + "dedupItems": false + } + ], + "matterName": "Records Management", + "itemsCount": 1, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "responseStatusMessages": null, + "exception": null, + "message": null +} \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getExtendedSearchesByMatter.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getExtendedSearchesByMatter.json new file mode 100644 index 0000000000..8d4f061c93 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getExtendedSearchesByMatter.json @@ -0,0 +1,52 @@ +{ + "searches":[ + { + "search":{ + "searchID":"8271f101-8c14-4c41-8865-edc5d8baed99", + "matterID":"cb70c7fa-8972-4400-af1d-ff5dd76d2104", + "indexID":"c19454c6-c378-43c1-ae59-d0d013e30915", + "name":"DARTS_RPO_2024-08-13", + "description":"", + "createdDate":"2024-08-13T16:40:38.3681103+00:00", + "totalCount":5, + "userID":"3cda3b0c-7b80-4c5e-b374-5015a90191ac", + "lock":false, + "etlType":null, + "timezone":"Europe/London", + "clientTimezone":"Europe/London", + "continuationToken":null, + "materializedItemsCount":5, + "maxMaterializedItemsCount":100, + "status":1, + "isSaved":true, + "isPaused":false, + "isDeleted":false, + "isReset":false, + "isForO365":false, + "createExport":false, + "isError":false, + "errorText":null, + "priority":0, + "heartBeat":"2024-08-13T16:43:17.218383+00:00", + "searchAfter":"[1723556884128,\"4b955aac-9dec-7a7e-ac20-01914bfc32e8\"]", + "sortingField":"ingestionDate", + "sortingType":1, + "isCreateExportError":false, + "hasDeletedItems":false, + "initialMaterializedItemsCount":0 + }, + "exportsCount":1, + "username":"Id: 7812", + "ttl":null, + "expirationDate":null + } + ], + "itemsCount":1, + "status":200, + "demoMode":false, + "isError":false, + "responseStatus":0, + "responseStatusMessages":null, + "exception":null, + "message":null +} \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getIndexesByMatterId.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getIndexesByMatterId.json new file mode 100644 index 0000000000..a8c04cb25d --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getIndexesByMatterId.json @@ -0,0 +1,108 @@ +{ + "indexes": [ + { + "index": { + "indexID": "c19454c6-c378-43c1-ae59-d0d013e30915", + "isGroup": false, + "name": "rm5", + "displayName": "rm5", + "userIndexID": "2f4d6512-64b5-4478-940d-bd29e115591c", + "userID": "8b2a9527-e8e2-4430-8e51-b2af4227ff10", + "azureSearchAccountID": "dac6878a-6269-48de-981d-3f2f43dfddd2", + "indexStatusID": 4, + "notified": false, + "startDate": null, + "endDate": null, + "discoveryStartDate": "2023-11-16T13:53:03.94151+00:00", + "discoveryEndDate": "2023-11-16T14:36:19.5597796+00:00", + "buildStartDate": "2023-11-16T14:37:43.4140026+00:00", + "buildEndDate": "2023-11-16T16:22:19.4438814+00:00", + "resumeStartDate": "2024-07-25T10:56:39.5283925+00:00", + "resumeEndDate": null, + "stoppingStartDate": "2024-07-25T09:21:05.1366667+00:00", + "stoppingEndDate": null, + "createdDate": "2023-11-16T13:52:49.614141+00:00", + "totalTime": 8883.4780311, + "blobCount": 768987, + "blobsProcessed": 768987, + "indexDiscoveryItemsCount": 1, + "indexDiscoveryItemsProcessed": 1, + "exceptionsCount": null, + "indexBlobExceptionsCount": 0, + "indexDiscoveryItemExceptionsCount": null, + "indexBatchJobPartitionsCount": 277, + "indexExceptionBatchPartitionsCount": null, + "indexUpdateBatchPartitionsCount": 299, + "indexUpdateExceptionBatchPartitionsCount": null, + "indexBatchLastJobPartitionsCount": null, + "indexBlobPartitionsCount": 7651, + "indexBlobJobExceptionPartitionsCount": null, + "indexBlobLastJobExceptionPartitionsCount": null, + "indexDiscoveryItemPartitionsCount": 1, + "indexDiscoveryItemExceptionPartitionsCount": null, + "indexJobExceptionPartitionsCount": null, + "indexLastJobExceptionPartitionsCount": null, + "tablePartitionSize": 100, + "updateDate": "2023-11-16T13:52:49.614141+00:00", + "lastJobID": 0, + "jobID": 1, + "indexBlobLastJobID": null, + "indexBlobJobID": 0, + "isContinous": true, + "isPrimary": true, + "isUsedForRM": true, + "continousIndexBlobPartitionsCount": 7935, + "requestSizeLimit": 100, + "skipContentOverLimit": true, + "skipContentIfParserError": true, + "fileSizeLimitToTikaParser": 52428800, + "sortByResultField": false, + "blobContainer": "cloud360", + "continuousIndexBatchSize": 16, + "continousTablePartitionSize": 100, + "isDeleted": false, + "mainQueueProcessPriority": 0, + "secondaryQueueProcessPriority": 1, + "buildBatchesInQueue": 1350, + "buildBatchesProcessed": 1350, + "buildContinuationToken": "0000000000000000276-0000000000000000000", + "buildExceptionContinuationToken": null, + "updateContinuationToken": "0000000000000000298-0000000000000000000", + "updateExceptionContinuationToken": null, + "countOnly": false, + "errorCodes": null, + "esIndexRolloverSize": null, + "esIndexRolloverSizePerShard": 40, + "esIndexNoReplicas": 1, + "esIndexNoShards": 6, + "isDiscoveryCancelled": false, + "indexContinuousLastSavedBlobExceptionPartitionsCount": null, + "continuousExceptionsInProgress": 0, + "preparingContinuousErrorBatches": false, + "schemaUpdated": false, + "discoveryItemsLock": false, + "blobExceptionsStreamUpdateNeeded": false, + "streamIDsToProcess": null, + "indexUpdateBlobPartitionsCount": 315, + "indexUpdateExceptionPartitionsCount": 176, + "indexUpdateExceptionsCount": 822, + "updateBlobCount": 3918, + "updateBlobsProcessed": 3918, + "indexLastSavedUpdateExceptionPartitionsCount": null, + "updateExceptionsInProgress": 0, + "preparingUpdateErrorBatches": false, + "poisonHandlingFailed": false + }, + "isMultiStream": false, + "children": [] + } + ], + "itemsCount": 1, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "responseStatusMessages": null, + "exception": null, + "message": null +} \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getMasterIndexFieldByRecordClassSchema.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getMasterIndexFieldByRecordClassSchema.json new file mode 100644 index 0000000000..201e4ad954 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getMasterIndexFieldByRecordClassSchema.json @@ -0,0 +1,1454 @@ +{ + "masterIndexFields": [ + { + "isRecordClass": true, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [ + { + "masterIndexFieldSelectOptionsID": "0d85521e-6b50-44a0-bb84-ed281e97a2b8", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "A360TEST (A360 Test Record Class)", + "value": "A360TEST", + "isSystem": true + }, + { + "masterIndexFieldSelectOptionsID": "5d0f73c2-0ff8-49f8-877f-6c6dc9b206d1", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "BACCHUS (BACCHUS)", + "value": "BACCHUS", + "isSystem": true + }, + { + "masterIndexFieldSelectOptionsID": "ce8d4b6b-a3a2-4e23-901e-2b49641ab03b", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "BooksStandard (BooksStandard)", + "value": "BooksStandard", + "isSystem": true + }, + { + "masterIndexFieldSelectOptionsID": "1b8f5a22-8077-4f36-92cb-ca8a09806089", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "DARTS (DARTS)", + "value": "DARTS", + "isSystem": true + }, + { + "masterIndexFieldSelectOptionsID": "59d17101-db71-4a2d-8e81-506072a204a9", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "IADEMO (ImmigrationAndAsylumDemo)", + "value": "IADEMO", + "isSystem": true + }, + { + "masterIndexFieldSelectOptionsID": "edac3ae9-0886-4ee4-88c9-f8bd633abdac", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "LIBRAA (LIBRA Archive)", + "value": "LIBRAA", + "isSystem": true + }, + { + "masterIndexFieldSelectOptionsID": "b77d58cb-eb00-4392-8b67-c28633015aca", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "LIMIT (LIMIT)", + "value": "LIMIT", + "isSystem": true + }, + { + "masterIndexFieldSelectOptionsID": "0278e1eb-2c35-414c-86ba-04e7974526c9", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "LogFiles (LogFiles)", + "value": "LogFiles", + "isSystem": true + }, + { + "masterIndexFieldSelectOptionsID": "14f59f4a-d6c3-4354-a46a-d03569ad5812", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "Movie (Movie)", + "value": "Movie", + "isSystem": true + }, + { + "masterIndexFieldSelectOptionsID": "8e32935f-1924-4e7a-85a9-20bcf4b86bae", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "RC1_6years (Record Class 1)", + "value": "RC1_6years", + "isSystem": true + }, + { + "masterIndexFieldSelectOptionsID": "a07a370a-abfb-4a08-a20f-3494b80f073b", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "RC16years (Record Class 1)", + "value": "RC16years", + "isSystem": true + }, + { + "masterIndexFieldSelectOptionsID": "2c0319b0-12f2-437b-a56e-302faf355add", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "RC6Years (Record class years)", + "value": "RC6Years", + "isSystem": true + }, + { + "masterIndexFieldSelectOptionsID": "01421d3a-b351-43cb-8abf-e07c37d626ec", + "masterIndexFieldId": "200b9c27-b497-4977-82e7-1586b32a5871", + "label": "rm (rm)", + "value": "rm", + "isSystem": true + } + ], + "watermark": null, + "defaultVisible": true, + "defaultRequireField": true, + "hasHistory": false, + "masterIndexFieldID": "200b9c27-b497-4977-82e7-1586b32a5871", + "propertyName": "record_class", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "Record Class", + "inputType": "dropdown", + "order": 3, + "isSearchable": true, + "isRetrievable": true, + "isSortable": true, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": true, + "isLiteSearch": true, + "isSystem": true, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": true, + "isUsedForRM": true, + "isGlobal": true, + "isMasked": false, + "classification": null, + "required": true, + "isNew": false, + "acceptedValues": null, + "oldAcceptedValues": null, + "allowSubmission": true, + "enableHistory": false, + "isEditable": false, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "90ee0e13-8639-4c4a-b542-66b6c8911549", + "propertyName": "ingestionDate", + "propertyType": "date", + "jsonPropertyType": "date", + "displayName": "Archived Date", + "inputType": "date", + "order": 1, + "isSearchable": false, + "isRetrievable": true, + "isSortable": true, + "isFilterable": true, + "insertExtension": " ", + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": true, + "isLiteSearch": false, + "isSystem": true, + "isMandatory": false, + "isMandatoryForIndexing": true, + "isFromBlob": true, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": true, + "isUsedForRM": true, + "isGlobal": true, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": null, + "oldAcceptedValues": null, + "allowSubmission": false, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "a9b8daf2-d9ff-4815-b65a-f6ae2763b92c", + "propertyName": "client_identifier", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "Client Identifier", + "inputType": null, + "order": 3, + "isSearchable": true, + "isRetrievable": true, + "isSortable": true, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": true, + "isLiteSearch": true, + "isSystem": true, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": true, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "109b6bf1-57a0-48ec-b22e-c7248dc74f91", + "propertyName": "contributor", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "Contributor", + "inputType": null, + "order": 3, + "isSearchable": true, + "isRetrievable": true, + "isSortable": true, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": true, + "isLiteSearch": true, + "isSystem": true, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": true, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": null, + "oldAcceptedValues": null, + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": false, + "masterIndexFieldID": "893048bf-1e7c-4811-9abf-00cd77a715cf", + "propertyName": "recordDate", + "propertyType": "date", + "jsonPropertyType": "date", + "displayName": "Record Date", + "inputType": "date", + "order": 1, + "isSearchable": false, + "isRetrievable": true, + "isSortable": true, + "isFilterable": true, + "insertExtension": " ", + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": true, + "isLiteSearch": true, + "isSystem": true, + "isMandatory": true, + "isMandatoryForIndexing": true, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": true, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": true, + "isUsedForRM": true, + "isGlobal": true, + "isMasked": false, + "classification": null, + "required": true, + "isNew": false, + "acceptedValues": null, + "oldAcceptedValues": null, + "allowSubmission": true, + "enableHistory": false, + "isEditable": false, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "fdd0fcbb-da46-4af1-a627-ac255c12bb23", + "propertyName": "bf_012", + "propertyType": "number", + "jsonPropertyType": "number", + "displayName": "ObjectId", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "1332b6b2-d4b1-4a9a-b13d-f5a08d9cc803", + "propertyName": "bf_013", + "propertyType": "number", + "jsonPropertyType": "number", + "displayName": "ParentId", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "0eb3adc8-f220-4074-9ad4-64c43313b5c6", + "propertyName": "bf_014", + "propertyType": "number", + "jsonPropertyType": "number", + "displayName": "Channel", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "9af92904-442c-44c1-916c-c1ee6d019140", + "propertyName": "bf_015", + "propertyType": "number", + "jsonPropertyType": "number", + "displayName": "MaxChannels", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "03d413d8-126e-4330-ba76-ff09405c2856", + "propertyName": "bf_001", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "ObjectType", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "2fdfffce-0390-44b0-9b3f-038b790f26ad", + "propertyName": "bf_002", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "CaseNumbers", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "6afc68a3-ea09-478c-ad28-a57b846c4d57", + "propertyName": "bf_003", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "FileType", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "5aa6b522-bcee-44d3-95d2-5497a636f387", + "propertyName": "bf_005", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "Checksum", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "b885df16-7ce4-404c-a0c6-036d071d6a2f", + "propertyName": "bf_006", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "TranscriptRequest", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "7cbc7937-87e6-4f8e-bc7b-de552ca8ed1e", + "propertyName": "bf_007", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "TranscriptType", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "ad3b574b-f0c7-492e-8a47-c9645b558c09", + "propertyName": "bf_008", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "TranscriptUrgency", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "1337a236-c482-4a7d-baa3-4875cb484767", + "propertyName": "bf_009", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "Comments", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "ea88ea00-fb7c-41a3-b0c8-adf2bfb8df18", + "propertyName": "bf_016", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "UploadedBy", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "5865d506-87d9-4733-8efc-026d636793d4", + "propertyName": "bf_004", + "propertyType": "date", + "jsonPropertyType": "date", + "displayName": "HearingDate", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "519d88cb-dad2-4c6a-ac3a-b41bc3519c68", + "propertyName": "bf_010", + "propertyType": "date", + "jsonPropertyType": "date", + "displayName": "CreatedDateTime", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "0c5b03b8-86f0-45df-a6ab-17085131b54c", + "propertyName": "bf_011", + "propertyType": "date", + "jsonPropertyType": "date", + "displayName": "StartDateTime", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "9fb67f04-5fac-4d41-97ef-ac92267ff0e7", + "propertyName": "bf_017", + "propertyType": "date", + "jsonPropertyType": "date", + "displayName": "EndDateTime", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "94aadf8a-a13e-4b35-af25-034f01f1f2c2", + "propertyName": "bf_018", + "propertyType": "date", + "jsonPropertyType": "date", + "displayName": "PlaceholderDate", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "11dc6223-fd52-4714-950b-d74d721f1dae", + "propertyName": "bf_019", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "Courthouse", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + }, + { + "isRecordClass": false, + "isPublisher": false, + "isRegion": false, + "dropDownOptions": [], + "watermark": null, + "defaultVisible": false, + "defaultRequireField": false, + "hasHistory": true, + "masterIndexFieldID": "ae888318-1500-44f4-92b9-f09824e6ae1f", + "propertyName": "bf_020", + "propertyType": "string", + "jsonPropertyType": "string", + "displayName": "Courtroom", + "inputType": null, + "order": 255, + "isSearchable": false, + "isRetrievable": false, + "isSortable": false, + "isFilterable": false, + "insertExtension": null, + "highlight": false, + "isSimpleSearch": false, + "isAllFields": false, + "isAdvancedSearch": false, + "isLiteSearch": false, + "isSystem": false, + "isMandatory": false, + "isMandatoryForIndexing": false, + "isFromBlob": false, + "isFromParser": false, + "isDbSearch": false, + "onlyForDBSearch": false, + "isCriteriaLogic": false, + "isContent": false, + "parentId": null, + "type": 0, + "previewHighlight": false, + "isReadOnly": false, + "isUsedForRM": true, + "isGlobal": false, + "isMasked": false, + "classification": null, + "required": false, + "isNew": false, + "acceptedValues": "", + "oldAcceptedValues": "", + "allowSubmission": true, + "enableHistory": false, + "isEditable": true, + "acceptedValuesList": [], + "dataScopeEntitlementNotApplied": false, + "oldAcceptedValuesList": [] + } + ], + "itemsCount": 25, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "responseStatusMessages": null, + "exception": null, + "message": null +} \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getProductionOutputFiles.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getProductionOutputFiles.json new file mode 100644 index 0000000000..ad5e98cfe7 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getProductionOutputFiles.json @@ -0,0 +1,97 @@ +{ + "production": { + "edrmFile": false, + "csvSummary": true, + "binary": false, + "manifest": false, + "productionID": "1b6a29d9-a72e-420b-8d69-b8acbeed806a", + "matterID": "cb70c7fa-8972-4400-af1d-ff5dd76d2104", + "name": "DARTS_RPO_2024-08-13_CSV", + "description": "search grid results", + "status": 4, + "errorCode": 0, + "errorDescr": null, + "bates": false, + "exportType": 32, + "nativeMsgToPst": false, + "flattenFolderHierarchy": false, + "nativeMaxContainerSize": 1000, + "nativeMaxItemsPerContainer": 500000, + "nativeIncludeJournalReport": false, + "pdfSearchablePDF": false, + "pdfConsolidateItems": false, + "pdfPageBreak": false, + "pdfItemsPerExportFile": 0, + "lastUpdateTime": "2024-08-13T16:50:21.1505806+00:00", + "startProductionTime": "2024-08-13T16:50:15.4091127+00:00", + "endProductionTime": "2024-08-13T16:50:21.1592576+00:00", + "createdDate": "2024-08-13T16:50:12.6428988+00:00", + "custodianID": 7812, + "itemsCount": 5, + "estimateCount": 5, + "processedItemsCount": 5, + "progressItemsCount": 5, + "filesSummaryFile": 2, + "outputContent": 0, + "storageType": 1, + "storageAccountID": "aeb01bc8-9292-47a7-88a3-8fc89ebc3e10", + "isStopped": false, + "indexIsDeleted": false, + "targetType": null, + "targetSmtp": null, + "autoStartExport": true, + "deleteSearch": false, + "dedupItems": false, + "exportMetadata": "[{\"MasterIndexField\":\"200b9c27-b497-4977-82e7-1586b32a5871\",\"DisplayName\":\"Record Class\",\"PropertyName\":\"record_class\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"90ee0e13-8639-4c4a-b542-66b6c8911549\",\"DisplayName\":\"Archived Date\",\"PropertyName\":\"ingestionDate\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"a9b8daf2-d9ff-4815-b65a-f6ae2763b92c\",\"DisplayName\":\"Client Identifier\",\"PropertyName\":\"client_identifier\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"109b6bf1-57a0-48ec-b22e-c7248dc74f91\",\"DisplayName\":\"Contributor\",\"PropertyName\":\"contributor\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"893048bf-1e7c-4811-9abf-00cd77a715cf\",\"DisplayName\":\"Record Date\",\"PropertyName\":\"recordDate\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"fdd0fcbb-da46-4af1-a627-ac255c12bb23\",\"DisplayName\":\"ObjectId\",\"PropertyName\":\"bf_012\",\"PropertyType\":\"number\",\"IsMasked\":false},{\"MasterIndexField\":\"1332b6b2-d4b1-4a9a-b13d-f5a08d9cc803\",\"DisplayName\":\"ParentId\",\"PropertyName\":\"bf_013\",\"PropertyType\":\"number\",\"IsMasked\":false},{\"MasterIndexField\":\"0eb3adc8-f220-4074-9ad4-64c43313b5c6\",\"DisplayName\":\"Channel\",\"PropertyName\":\"bf_014\",\"PropertyType\":\"number\",\"IsMasked\":false},{\"MasterIndexField\":\"9af92904-442c-44c1-916c-c1ee6d019140\",\"DisplayName\":\"MaxChannels\",\"PropertyName\":\"bf_015\",\"PropertyType\":\"number\",\"IsMasked\":false},{\"MasterIndexField\":\"03d413d8-126e-4330-ba76-ff09405c2856\",\"DisplayName\":\"ObjectType\",\"PropertyName\":\"bf_001\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"2fdfffce-0390-44b0-9b3f-038b790f26ad\",\"DisplayName\":\"CaseNumbers\",\"PropertyName\":\"bf_002\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"6afc68a3-ea09-478c-ad28-a57b846c4d57\",\"DisplayName\":\"FileType\",\"PropertyName\":\"bf_003\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"5aa6b522-bcee-44d3-95d2-5497a636f387\",\"DisplayName\":\"Checksum\",\"PropertyName\":\"bf_005\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"b885df16-7ce4-404c-a0c6-036d071d6a2f\",\"DisplayName\":\"TranscriptRequest\",\"PropertyName\":\"bf_006\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"7cbc7937-87e6-4f8e-bc7b-de552ca8ed1e\",\"DisplayName\":\"TranscriptType\",\"PropertyName\":\"bf_007\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"ad3b574b-f0c7-492e-8a47-c9645b558c09\",\"DisplayName\":\"TranscriptUrgency\",\"PropertyName\":\"bf_008\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"1337a236-c482-4a7d-baa3-4875cb484767\",\"DisplayName\":\"Comments\",\"PropertyName\":\"bf_009\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"ea88ea00-fb7c-41a3-b0c8-adf2bfb8df18\",\"DisplayName\":\"UploadedBy\",\"PropertyName\":\"bf_016\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"5865d506-87d9-4733-8efc-026d636793d4\",\"DisplayName\":\"HearingDate\",\"PropertyName\":\"bf_004\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"519d88cb-dad2-4c6a-ac3a-b41bc3519c68\",\"DisplayName\":\"CreatedDateTime\",\"PropertyName\":\"bf_010\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"0c5b03b8-86f0-45df-a6ab-17085131b54c\",\"DisplayName\":\"StartDateTime\",\"PropertyName\":\"bf_011\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"9fb67f04-5fac-4d41-97ef-ac92267ff0e7\",\"DisplayName\":\"EndDateTime\",\"PropertyName\":\"bf_017\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"94aadf8a-a13e-4b35-af25-034f01f1f2c2\",\"DisplayName\":\"PlaceholderDate\",\"PropertyName\":\"bf_018\",\"PropertyType\":\"date\",\"IsMasked\":false},{\"MasterIndexField\":\"11dc6223-fd52-4714-950b-d74d721f1dae\",\"DisplayName\":\"Courthouse\",\"PropertyName\":\"bf_019\",\"PropertyType\":\"string\",\"IsMasked\":false},{\"MasterIndexField\":\"ae888318-1500-44f4-92b9-f09824e6ae1f\",\"DisplayName\":\"Courtroom\",\"PropertyName\":\"bf_020\",\"PropertyType\":\"string\",\"IsMasked\":false}]", + "exportLocation": null, + "totalSize": null + }, + "productionExportFile": [ + { + "productionExportFile": { + "productionExportFileID": "741d78c1-d722-419d-b72c-74f9972ff60e", + "productionID": "1b6a29d9-a72e-420b-8d69-b8acbeed806a", + "exportTypeID": 32, + "exportFileTypeID": 6, + "status": 4, + "isBlobLink": false, + "streamID": 0, + "blobID": null, + "blobSize": 2332, + "attachmentBlobSize": 0, + "nrItemsInOutput": 5, + "nrPages": 1, + "nrItems": 5, + "itemsTotalSize": 0, + "nrLists": 1, + "creationDT": "2024-08-13T16:50:18.5342135+00:00", + "startDT": "2024-08-13T16:50:20.9717025+00:00", + "heartbeatDT": "2024-08-13T16:50:20.9717025+00:00", + "endDT": "2024-08-13T16:50:21.1748325+00:00", + "affinityCookie": null, + "errorDescr": null, + "fileOrder": 1 + }, + "exportFileType": { + "exportFileTypeID": 6, + "fileType": "CSV V1", + "exportFileTypeMime": "text/CSV", + "exportFileTypeFolder": "PST", + "exportFileTypeExtension": ".csv" + }, + "exportType": { + "exportTypeID": 32, + "name": "SearchTable" + } + } + ], + "rights": null, + "itemsCount": 1, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "responseStatusMessages": null, + "exception": null, + "message": null +} \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getProfileEntitlements.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getProfileEntitlements.json new file mode 100644 index 0000000000..188ad70cd2 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getProfileEntitlements.json @@ -0,0 +1,21 @@ +{ + "entitlements":[ + { + "entitlementID":"96293900-5082-4051-bbad-c961fb22091d", + "name":"SRV-DARTS-RW-E", + "description":"SRV-DARTS-RW-E", + "profileId":"f2a07572-e13e-4939-9d5e-252a372f5115", + "isDeleted":false, + "profileName":"SRV-DARTS-RW-P", + "profileDescription":"Minimum permissions required for UpdateMetadata and DownloadBlob." + } + ], + "itemsCount":1, + "status":200, + "demoMode":false, + "isError":false, + "responseStatus":0, + "responseStatusMessages":null, + "exception":null, + "message":null +} \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getRecordManagementMatter.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getRecordManagementMatter.json new file mode 100644 index 0000000000..0b20e4ea41 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getRecordManagementMatter.json @@ -0,0 +1,23 @@ +{ + "recordManagementMatter": { + "matterCategory": 3, + "matterID": "cb70c7fa-8972-4400-af1d-ff5dd76d2104", + "name": "Records Management", + "isQuickSearch": false, + "isUsedForRM": true, + "description": "Records Management", + "createdDate": "2022-12-14T08:50:55.75+00:00", + "type": 1, + "status": 0, + "userID": null, + "backgroundJobID": null, + "isClosed": false + }, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "responseStatusMessages": null, + "exception": null, + "message": null +} \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getStorageAccounts.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getStorageAccounts.json new file mode 100644 index 0000000000..37d574bb91 --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/getStorageAccounts.json @@ -0,0 +1,114 @@ +{ + "data": [ + { + "id": "aeb01bc8-9292-47a7-88a3-8fc89ebc3e10", + "displayName": "a360c2x2555blob", + "name": "a360c2x2555blob", + "replication": { + "id": 0, + "display": "Locally redundant storage (LRS)" + }, + "location": "", + "kind": { + "id": 1, + "display": "StorageV2 (general purpose v2)" + }, + "tier": { + "id": 0, + "display": "Standard" + }, + "accessTier": null, + "isApplication": false, + "useEncryption": false, + "useForOffice365Export": false, + "useForAuditArchive": false, + "existing": false, + "keyType": { + "id": 3, + "display": "Key Vault Access Key" + }, + "key": "********\t", + "capacity": "501.92 GB", + "defaultForBlob": false, + "defaultForJson": false, + "defaultForExport": false, + "streams": [ + { + "streamID": 100, + "blobStorageAccountID": "aeb01bc8-9292-47a7-88a3-8fc89ebc3e10", + "jsonStorageAccountID": "df29511c-76c4-46d4-80c1-9d7f108eb551", + "name": "rm", + "description": "rm", + "compliance": false, + "encyptedStream": false, + "updateDate": "2022-12-16T09:26:30.863724+00:00", + "createdDate": "2022-12-16T09:26:30.863724+00:00", + "lastActivity": "2024-08-13T16:22:53.1744311+00:00", + "retentionCategoryID": 1, + "rawIngestion": false, + "disable": false, + "isIngestionDisabled": false, + "isCleaning": false, + "isUsedForRM": true + } + ] + }, + { + "id": "df29511c-76c4-46d4-80c1-9d7f108eb551", + "displayName": "a360c2x2555json", + "name": "a360c2x2555json", + "replication": { + "id": 1, + "display": "Geo-redundant storage (GRS)" + }, + "location": null, + "kind": { + "id": 1, + "display": "StorageV2 (general purpose v2)" + }, + "tier": null, + "accessTier": null, + "isApplication": false, + "useEncryption": false, + "useForOffice365Export": false, + "useForAuditArchive": false, + "existing": true, + "keyType": { + "id": 3, + "display": "Key Vault Access Key" + }, + "key": "********\t", + "capacity": "62.46 GB", + "defaultForBlob": false, + "defaultForJson": false, + "defaultForExport": true, + "streams": [ + { + "streamID": 100, + "blobStorageAccountID": "aeb01bc8-9292-47a7-88a3-8fc89ebc3e10", + "jsonStorageAccountID": "df29511c-76c4-46d4-80c1-9d7f108eb551", + "name": "rm", + "description": "rm", + "compliance": false, + "encyptedStream": false, + "updateDate": "2022-12-16T09:26:30.863724+00:00", + "createdDate": "2022-12-16T09:26:30.863724+00:00", + "lastActivity": "2024-08-13T16:22:53.1744311+00:00", + "retentionCategoryID": 1, + "rawIngestion": false, + "disable": false, + "isIngestionDisabled": false, + "isCleaning": false, + "isUsedForRM": true + } + ] + } + ], + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "responseStatusMessages": null, + "exception": null, + "message": null +} \ No newline at end of file diff --git a/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/removeProduction.json b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/removeProduction.json new file mode 100644 index 0000000000..ca7feb2e2b --- /dev/null +++ b/src/integrationTest/resources/tests/arm/client/ArmRpoClientIntTest/mocks/removeProduction.json @@ -0,0 +1,10 @@ +{ + "isValid": false, + "status": 200, + "demoMode": false, + "isError": false, + "responseStatus": 0, + "responseStatusMessages": null, + "exception": null, + "message": null +} \ No newline at end of file diff --git a/src/main/java/uk/gov/hmcts/darts/arm/client/model/rpo/MasterIndexFieldByRecordClassSchemaResponse.java b/src/main/java/uk/gov/hmcts/darts/arm/client/model/rpo/MasterIndexFieldByRecordClassSchemaResponse.java index 3781257a35..097239d198 100644 --- a/src/main/java/uk/gov/hmcts/darts/arm/client/model/rpo/MasterIndexFieldByRecordClassSchemaResponse.java +++ b/src/main/java/uk/gov/hmcts/darts/arm/client/model/rpo/MasterIndexFieldByRecordClassSchemaResponse.java @@ -30,8 +30,6 @@ public static class MasterIndexField { private Boolean isMasked; } - - } diff --git a/src/testCommon/java/uk/gov/hmcts/darts/test/common/TestUtils.java b/src/testCommon/java/uk/gov/hmcts/darts/test/common/TestUtils.java index 41017b5d0e..cba5b0ae4e 100644 --- a/src/testCommon/java/uk/gov/hmcts/darts/test/common/TestUtils.java +++ b/src/testCommon/java/uk/gov/hmcts/darts/test/common/TestUtils.java @@ -183,4 +183,11 @@ public static String removeIds(String input) { return input.replaceAll("\"case_id\".{1,6},", "") .replaceAll("\"id\".{1,6},", ""); } + + public static String writeAsString(Object object) throws JsonProcessingException { + if (object instanceof String) { + return String.valueOf(object); + } + return getObjectMapper().writeValueAsString(object); + } } \ No newline at end of file