diff --git a/.gitignore b/.gitignore index 8e49dec5..8e8c9a9f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,11 @@ !gradle/wrapper/gradle-wrapper.jar *.class bin/main/application.yaml +bin/contractTest/ +bin/functionalTest/ +bin/integrationTest/ +bin/main/ +bin/test/ ### STS ### .apt_generated diff --git a/pacts/prl-dgs-api-CCD_CASE_DOCS_AM_API.json b/pacts/prl-dgs-api-CCD_CASE_DOCS_AM_API.json index abd6f195..4c6913f2 100644 --- a/pacts/prl-dgs-api-CCD_CASE_DOCS_AM_API.json +++ b/pacts/prl-dgs-api-CCD_CASE_DOCS_AM_API.json @@ -17,23 +17,7 @@ } }, "response": { - "status": 200, - "headers": { - "Content-Type": "application/vnd\u63AFuk\u98E0gov\u8E83hmcts\uED68dm\u347Adocument\u7C16v1haljson;charset=UTF-8" - }, - "matchingRules": { - "header": { - "Content-Type": { - "matchers": [ - { - "match": "regex", - "regex": "application/vnd.uk.gov.hmcts.dm.document.v1+hal+json;charset=UTF-8" - } - ], - "combine": "AND" - } - } - } + "status": 200 }, "providerStates": [ { @@ -51,23 +35,7 @@ } }, "response": { - "status": 500, - "headers": { - "Content-Type": "application/vnd\uF5A0uk\uE1D7gov\u0205hmcts\u0E15dm\uCDCDdocument\u0B01v111haljson;charset=UTF-8" - }, - "matchingRules": { - "header": { - "Content-Type": { - "matchers": [ - { - "match": "regex", - "regex": "application/vnd.uk.gov.hmcts.dm.document.v1+hal+json;charset=UTF-8" - } - ], - "combine": "AND" - } - } - } + "status": 500 }, "providerStates": [ { diff --git a/src/contractTest/java/uk/gov/hmcts/reform/prl/documentgenerator/CdamApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/prl/documentgenerator/CdamApiConsumerTest.java index 79e66102..42a93d67 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/prl/documentgenerator/CdamApiConsumerTest.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/prl/documentgenerator/CdamApiConsumerTest.java @@ -1,7 +1,6 @@ package uk.gov.hmcts.reform.prl.documentgenerator; import au.com.dius.pact.consumer.MockServer; -import au.com.dius.pact.consumer.dsl.PactDslJsonBody; import au.com.dius.pact.consumer.dsl.PactDslWithProvider; import au.com.dius.pact.consumer.junit5.PactConsumerTestExt; import au.com.dius.pact.consumer.junit5.PactTestFor; @@ -67,8 +66,6 @@ RequestResponsePact downloadDocument(PactDslWithProvider builder) throws JSONExc .headers(AUTHORIZATION_HEADER, someAuthToken) .path("/cases/documents/" + someDocumentId) .willRespondWith() - .matchHeader(org.springframework.http.HttpHeaders.CONTENT_TYPE, - "application/vnd.uk.gov.hmcts.dm.document.v1+hal+json;charset=UTF-8") .status(HttpStatus.SC_OK) .toPact(); } @@ -97,8 +94,6 @@ RequestResponsePact noAuthDownloadDocument(PactDslWithProvider builder) throws J .headers(SERVICE_AUTHORIZATION_HEADER, invalidServiceAuthToken) .path("/cases/documents/" + someDocumentId) .willRespondWith() - .matchHeader(org.springframework.http.HttpHeaders.CONTENT_TYPE, - "application/vnd.uk.gov.hmcts.dm.document.v1+hal+json;charset=UTF-8") .status(HttpStatus.SC_INTERNAL_SERVER_ERROR) .toPact(); } @@ -119,11 +114,6 @@ public void verifyNoAuthDownloadDocument(MockServer mockServer) throws IOExcepti RequestResponsePact uploadDocument(PactDslWithProvider builder) throws JSONException, IOException { // @formatter:off - PactDslJsonBody body = new PactDslJsonBody() - .stringMatcher("caseTypeId", "PRLAPPS") - .stringMatcher("jurisdictionId", "PRIVATELAW") - .asBody(); - return builder .given("A request to upload a document") .uponReceiving("a request to upload a document with valid authorization")