Bruno Holanda
08/14/2023, 7:04 PMGuzzleHttp\Exception\ServerException: Server error: `GET <http://localhost:7200/interactions/verification>` resulted in a `500 Internal Server Error` response:
├ Actual interactions do not match expected interactions for mock MockService
I have pact installed in my composer.json, and my .env.test with the environments, what should i do?🤔Matt (pactflow.io / pact-js / pact-go)
Bruno Holanda
08/14/2023, 10:09 PMPhpPact\Standalone\Exception\HealthCheckFailedException: Failed to make connection to Mock Server in 10 attempts.
Matt (pactflow.io / pact-js / pact-go)
127.0.0.1
- sometimes localhost
resolves to an IPv6 addressBruno Holanda
08/15/2023, 12:05 PMENV GLIBC_VERSION=2.35-r0
RUN apk --no-cache add gcompat bash \
&& wget -O /etc/apk/keys/sgerrand.rsa.pub -q <https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub> \
&& wget -q <https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk> \
&& apk --no-cache --force-overwrite add glibc-${GLIBC_VERSION}.apk
Maybe that's not enough anymore 😞Yousaf Nabi (pactflow.io)
Bruno Holanda
08/15/2023, 12:08 PMYousaf Nabi (pactflow.io)
Matt (pactflow.io / pact-js / pact-go)
pact-mock-service
command you see in that output manually, and seeing what happens. If it doesn’t start, it’s probably a good place to start debuggingYousaf Nabi (pactflow.io)
gcompat
and libccompat
Matts suggestion to run it from the bin folder directly is a good idea just to check the output outside of php and check the service can start upBruno Holanda
08/15/2023, 12:15 PMBruno Holanda
08/16/2023, 1:07 PMActual interactions do not match expected interactions for mock MockService.
Missing requests:
POST /freights
See standard out/err for details
Where do I get this out/err in pact?Yousaf Nabi (pactflow.io)
Bruno Holanda
08/16/2023, 8:20 PM$client = new Client();
$url = "http://{$config->getHost()}:{$config->getPort()}/freights";
$client->post($url, [
'json' => $engineRequest,
]);
Matt (pactflow.io / pact-js / pact-go)
Hey guys, I was debbuging and found the full message for the error.what did you have to do to see that message? That’s the key thing a user would need to see to understand why their test failed, so it should hopefully be obvious. If it’s not, I think it should be fixed
Bruno Holanda
08/21/2023, 1:50 PM