Rob Turner
05/22/2023, 3:57 PMmake
file that references pactfoundation/pact-cli
. But this does not exist in the repo so it fails. can't see any sign of this folder anyway. Anyone know what the deal is?Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
PACT_CLI
https://github.com/pactflow/example-bi-directional-consumer-mountebank/blob/e63a9e7d43707b645d2e30b9d6703610ec711a01/Makefile#L10
for the docker run command for that imageRob Turner
05/22/2023, 4:08 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
PWD
with a prefix /
PACT_CLI="docker run --rm -v ${PWD}:${PWD} -e PACT_BROKER_BASE_URL -e PACT_BROKER_TOKEN pactfoundation/pact-cli"
vs
PACT_CLI_DOCKER_RUN_COMMAND?=docker run --rm -v /${PWD}:/${PWD} -w ${PWD} -e PACT_BROKER_BASE_URL -e PACT_BROKER_TOKEN pactfoundation/pact-cli:${PACT_CLI_DOCKER_VERSION}
That seemed to work for me cross platformRob Turner
05/22/2023, 4:18 PMRob Turner
05/22/2023, 4:19 PMRob Turner
05/22/2023, 4:20 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 4:24 PMRob Turner
05/22/2023, 4:24 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
docker run --rm \
-e PACT_BROKER_BASE_URL \
-e PACT_BROKER_TOKEN \
pactfoundation/pact-cli:latest \
publish \
/pact/example/pacts \
--consumer-app-version foo-commit
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 4:26 PMYousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 4:27 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
uname -a
?Rob Turner
05/22/2023, 4:27 PMRob Turner
05/22/2023, 4:28 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 4:29 PMRob Turner
05/22/2023, 4:29 PMRob Turner
05/22/2023, 4:30 PMYousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 4:30 PMmake
on wslRob Turner
05/22/2023, 4:38 PMRob Turner
05/22/2023, 4:39 PMYousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 4:39 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 4:41 PMRob Turner
05/22/2023, 4:42 PMRob Turner
05/22/2023, 4:42 PMRob Turner
05/22/2023, 4:42 PMYousaf Nabi (pactflow.io)
export PACT_BROKER_BASE_URL=<https://foobar.pactflow.io>
nice, I can get you sorted on cmd prompt too, I stretched my legs on there back in the day before becoming a mac boi, and I recently found oh my posh, so all my windows shells are dead pretty so don't mind an excuse dipping back into to devving on a windows boxRob Turner
05/22/2023, 4:44 PMRob Turner
05/22/2023, 4:45 PMRob Turner
05/22/2023, 4:45 PMYousaf Nabi (pactflow.io)
export PACT_BROKER_BASE_URL=<https://test.pactflow.io>
export PACT_BROKER_TOKEN=129cCdfCWhMzcC9pFwb4bw
and check if they work?Rob Turner
05/22/2023, 4:47 PMRob Turner
05/22/2023, 4:47 PMYousaf Nabi (pactflow.io)
echo $PACT_BROKER_TOKEN
in your shell to see it matches upYousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 4:49 PMRob Turner
05/22/2023, 4:49 PMRob Turner
05/22/2023, 4:50 PMYousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 4:52 PMRob Turner
05/22/2023, 4:52 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 4:57 PMRob Turner
05/22/2023, 4:57 PMRob Turner
05/22/2023, 4:57 PMmake
bants on the provider repoRob Turner
05/22/2023, 5:00 PMRob Turner
05/22/2023, 5:02 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 5:21 PMRob Turner
05/22/2023, 5:21 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
git checkout dotnet6
Yousaf Nabi (pactflow.io)
git fetch
if you've cloned the repoRob Turner
05/22/2023, 5:23 PMRob Turner
05/22/2023, 5:29 PMmake verify_swagger
doesn't seem to workRob Turner
05/22/2023, 5:29 PMRob Turner
05/22/2023, 5:29 PMYousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 5:32 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 5:32 PMRob Turner
05/22/2023, 5:32 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
dotnet example-bi-directional-provider-dotnet/bin/Debug/netcoreapp6.0/example-bi-directional-provider-dotnet.dll
and grabs the pidRob Turner
05/22/2023, 5:33 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 5:34 PMRob Turner
05/22/2023, 5:34 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
docker run --net="host" schemathesis/schemathesis:stable run --stateful=links --checks all <http://host.docker.internal:9000/swagger/v1/swagger.json> > report.txt
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
🕙18:33:41 ❯ docker run --net="host" schemathesis/schemathesis:stable run --stateful=links --checks all <http://host.docker.internal:9000/swagger/v1/swagger.json>
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
======================= Schemathesis test session starts =======================
Schema location: <http://host.docker.internal:9000/swagger/v1/swagger.json>
Base URL: <http://host.docker.internal:9000/>
Specification version: Open API 3.0.1
Workers: 1
Collected API operations: 2
GET /Products . [ 50%]
GET /Products/{id} . [100%]
=================================== SUMMARY ====================================
Performed checks:
not_a_server_error 101 / 101 passed PASSED
status_code_conformance 101 / 101 passed PASSED
content_type_conformance 101 / 101 passed PASSED
response_headers_conformance 101 / 101 passed PASSED
response_schema_conformance 101 / 101 passed PASSED
Hint: You can visualize test results in <http://Schemathesis.io|Schemathesis.io> by using `--report` in your CLI command.
Rob Turner
05/22/2023, 5:35 PMRob Turner
05/22/2023, 5:35 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 5:37 PMRob Turner
05/22/2023, 5:37 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 5:39 PMRob Turner
05/22/2023, 5:40 PMRob Turner
05/22/2023, 5:41 PMRob Turner
05/22/2023, 5:41 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 5:46 PMYousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 5:49 PMRob Turner
05/22/2023, 5:49 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 5:49 PMYousaf Nabi (pactflow.io)
Rob Turner
05/22/2023, 5:50 PMRob Turner
05/23/2023, 9:51 AMmake fake_ci
successfully for the provider, but the consumer still fails at the can-i-deploy
step in it's make fake_ci
step.
Not sure where to go from here because that's where the example documentation ends.Rob Turner
05/23/2023, 9:51 AMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Rob Turner
05/23/2023, 10:11 AMYousaf Nabi (pactflow.io)
thanks a lot for yesterday. Really helpful. Had to iron through a few more issues but think I’m nearly there now.Pleasure, glad you are cooking on gas
Rob Turner
05/23/2023, 10:12 AMRob Turner
05/23/2023, 10:12 AMRob Turner
05/23/2023, 10:19 AMRob Turner
05/23/2023, 10:21 AMRob Turner
05/23/2023, 10:21 AMdotnet test
from the make fileYousaf Nabi (pactflow.io)
Rob Turner
05/23/2023, 10:45 AMRob Turner
05/23/2023, 10:45 AMYousaf Nabi (pactflow.io)
Rob Turner
05/23/2023, 2:19 PMRob Turner
05/23/2023, 3:35 PMYousaf Nabi (pactflow.io)
dotnet --version
you may need to update the global.json to reflect your installed version
https://github.com/pactflow/example-bi-directional-provider-dotnet/pull/16/files#diff-8df3cd354bc584349d04ad5675b[…]8b99b741b8b95af394c55e0f5001bfR3Rob Turner
05/23/2023, 3:37 PMC:\dev\TestGround\PactflowStuff\contract-testing-poc\pactFlow\dotnet\example-apps\provider\example-bi-directional-provider-dotnet\example-bi-directional-provider-dotnet.csproj : error : The project file cannot be opened by the project system, because it is missing some critical imports or the referenced SDK cannot be found.
So I installed the latest SDK to see if that fixed it and it hasn't. Though I did just think I probs just need to restart my computer or somethingYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Though I did just think I probs just need to restart my computer or somethingThis is almost, always, never a bad shout
Rob Turner
05/23/2023, 3:37 PMRob Turner
05/23/2023, 3:38 PMRob Turner
05/23/2023, 3:43 PMRob Turner
05/23/2023, 3:44 PMYousaf Nabi (pactflow.io)
Rob Turner
05/23/2023, 3:46 PMRob Turner
05/23/2023, 3:58 PMYousaf Nabi (pactflow.io)
dotnet build --no-restore
and please show the error message if any?Rob Turner
05/23/2023, 4:04 PMRob Turner
05/23/2023, 4:04 PMRob Turner
05/23/2023, 4:27 PMRob Turner
05/23/2023, 4:30 PM