Ashish Merani
09/08/2022, 10:11 PM"au.com.dius.pact.provider:junit5:4.1.39"
I have specified @PactFolder("src/contractTest/")
but the test fails with the following error
1.1) Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)
It fails on context.verifyInteraction();
under
@TestTemplate
@ExtendWith(PactVerificationInvocationContextProvider.class)
void testTemplate(PactVerificationContext context) {
context.verifyInteraction();
}
I am trying to understand why it is making the call to localhost when I have specified a local path under @PactFolder annotation. Can anyone help?Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Ashish Merani
09/08/2022, 10:25 PMMatt (pactflow.io / pact-js / pact-go)
Slackbot
09/08/2022, 10:34 PMMatt (pactflow.io / pact-js / pact-go)
Ashish Merani
09/08/2022, 10:37 PMAshish Merani
09/08/2022, 11:44 PM@BeforeEach
void before(PactVerificationContext context) {
context.setTarget(HttpTestTarget.fromUrl(new URL(myProviderUrl)));
// or something like
// context.setTarget(new HttpTestTarget("localhost", myProviderPort, "/"));
}
Ashish Merani
09/08/2022, 11:44 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Ashish Merani
09/08/2022, 11:51 PMMatt (pactflow.io / pact-js / pact-go)