Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

pact-foundation/pact-mock-service-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is deprecated in favour of pactfoundation/pact-cli. It is no longer kept up to date.

Pact Mock Service Docker

Docker image running the pact mock service. You can pull the latest image from Dockerhub.

Usage

$ docker-compose up

Test that mock service is running

$ DOCKER_CONTAINER_IP=$(docker-machine ip default) # or localhost if using Docker native
$ curl -H "X-Pact-Mock-Service: true" http://${DOCKER_CONTAINER_IP}

Get pact contents

$ curl  -X POST \
        -H "X-Pact-Mock-Service: true" \
        -H "Content-Type: application/json" -d '{"consumer" : {"name": "Consumer Name"}, "provider": {"name": "Provider Name"}}' \
        http://${DOCKER_CONTAINER_IP}/pact

For examples of the other commands, see this script

About

Docker image running the Pact mock service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published