Skip to content

Commit c766d4f

Browse files
update the pact test to remove the need for host
1 parent f17aa7e commit c766d4f

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
* @hmcts/platform-operations @hmcts/developer-enablement
2-
3-
# Ignore files updated by Renovate
4-
gradle/wrapper/gradle-wrapper.properties
5-
Dockerfile
6-
build.gradle
7-
charts/**/Chart.yaml
8-
.github/workflows/*.yaml
1+
* @hmcts/cp-x-cjs-data-api

src/pactVerificationTest/java/uk/gov/hmcts/cp/pact/provider/CourtScheduleProviderPactTest.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import org.junit.jupiter.api.Tag;
1212
import org.junit.jupiter.api.TestTemplate;
1313
import org.junit.jupiter.api.extension.ExtendWith;
14+
import org.slf4j.Logger;
15+
import org.slf4j.LoggerFactory;
1416
import org.springframework.beans.factory.annotation.Autowired;
1517
import org.springframework.boot.test.context.SpringBootTest;
1618
import org.springframework.boot.test.web.server.LocalServerPort;
@@ -23,13 +25,14 @@
2325
@ExtendWith({SpringExtension.class, PactVerificationInvocationContextProvider.class})
2426
@Provider("CPCourtScheduleProvider")
2527
@PactBroker(
26-
scheme = "https",
27-
host = "${pact.broker.host}",
28+
url = "${pact.broker.url}",
2829
authentication = @PactBrokerAuth(token = "${pact.broker.token}")
2930
)
3031
@Tag("pact")
3132
public class CourtScheduleProviderPactTest {
3233

34+
private static final Logger LOG = LoggerFactory.getLogger(CourtScheduleProviderPactTest.class);
35+
3336
@Autowired
3437
private CourtScheduleRepository courtScheduleRepository;
3538

@@ -38,9 +41,9 @@ public class CourtScheduleProviderPactTest {
3841

3942
@BeforeEach
4043
void setupTarget(PactVerificationContext context) {
41-
System.out.println("Running test on port: " + port);
44+
LOG.atDebug().log("Running test on port: " + port);
4245
context.setTarget(new HttpTestTarget("localhost", port));
43-
System.out.println("pact.verifier.publishResults: " + System.getProperty("pact.verifier.publishResults"));
46+
LOG.atDebug().log("pact.verifier.publishResults: " + System.getProperty("pact.verifier.publishResults"));
4447
}
4548

4649
@State("court schedule for case 456789 exists")

0 commit comments

Comments
 (0)