PACT_PROVIDER_URL
yarn install
yarn run pact-test
yarn run swagger-validate-spec
yarn run swagger-validate-pact
yarn run pact-publish
cd docker && docker-compose up
./postman/postman-pact.sh
to generate postman collections in pact/postman/collections
./postman/postman-replace-urls.sh
to generate env configs for postman in pact/postman/env
where the urls are replaced with $PACT_PROVIDER_URL
./postman/postman-newman.sh
to run the postman collection against your $PACT_PROVIDER_URL
npx jest -c jest.newman.js
Note:- There are no tests in the saved postman collections, so it will run the requests, but will not validate the responses are as per the pacts.
TODO
$PACT_PROVIDER_URL
for all generated postman collections, add the ability to specify a provider name, and update the url accordingly.cd docker/pact-stub-service
Build the base pact image, change the name you54f
to your own dockerhub username
The Base image resides at base.Dockerfile
which will load the pact ruby standalone, plus a healthcheck endpoint /healthcheck
on the containers for use in AWS and other Cloud providers.
make pact_build
docker build -t pact-base -f base.Dockerfile . make pact_tag
docker tag pact-base you54f/pact-base make pact_push
docker push you54f/pact-base
You can then copy your pact files generated with yarn run test
into the docker/pact-stub-service/pacts
folder that the Dockerfile
will use.
copy_pacts
rm -rf pacts && cp -r ../../pact/pacts .
Look at the Dockerfile
FROM you54f/pact-base ARG PACT_FILE COPY ${PACT_FILE} /pact.json
See the docker/docker-compose.yml
file for how to load your pacts into the docker container.
version: "3.1" services: pact-stub-server-json: build: context: pact-stub-service args: PACT_FILE: pacts/test-consumer-json-provider.json ports: - "8080:8080"
You can run it with cd docker && docker-compose up
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4