Through the pact-mock-service.bat with the below versions, the pactSpecification in /pact is populated
App
Version
Working (y/n)
pact
1.53.0
n
pact-mock_service gem
2.9.8
n
pact
1.52.2
y
pact-mock_service gem
2.9.3
y
To replicate, run the following command on pact-1.53.0:
``"pact-mock-service.bat" service --consumer=someConsumer --provider=someProvider --pact-dir=.\example\output --pact-file-write-mode=overwrite --host=localhost --port=7200 --pact-specification-version=2.0.0
Then open up PostMan or make the following CURL posts:
`I, [2018-08-14T11:26:46.489303 #16280] INFO -- : Registered expected interaction GET /6/categories
D, [2018-08-14T11:26:46.489303 #16280] DEBUG -- : {
"description": "General Meetup Categories 6",
"providerState": "A GET request to return JSON using Meetups category api under version 2 6",
"request": {
"method": "GET",
"path": "/6/categories",
"headers": {
"Content-Type": "application/json"
}
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"body": {
"results": {
"name": "Games",
"sort_name": "Games",
"id": 11,
"shortname": "Games"
}
}
}
}```
There results missing version 2.0.0
I, [2018-08-14T11:27:03.426626 #16280] INFO -- : Verifying - interactions matched
I, [2018-08-14T11:27:40.132247 #16280] INFO -- : Writing pact for someProvider to ./example/output/someconsumer-someprovider.json... from someconsumer-someprovider.json{
"consumer": {
"name": "someConsumer"
},
"provider": {
"name": "someProvider"
},
"interactions": [
{
"description": "General Meetup Categories 6",
"providerState": "A GET request to return JSON using Meetups category api under version 2 6",
"request": {
"method": "GET",
"path": "/6/categories",
"headers": {
"Content-Type": "application/json"
}
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"body": {
"results": {
"name": "Games",
"sort_name": "Games",
"id": 11,
"shortname": "Games"
}
}
}
}
],
"metadata": {
"pactSpecification": {
"version": "0.0.0"
}
}
}```
Notice how we submitted 2.0.0 into the command but got out "0.0.0"
Through the pact-mock-service.bat with the below versions, the pactSpecification in /pact is populated
To replicate, run the following command on pact-1.53.0:
``"pact-mock-service.bat" service --consumer=someConsumer --provider=someProvider --pact-dir=.\example\output --pact-file-write-mode=overwrite --host=localhost --port=7200 --pact-specification-version=2.0.0
Then open up PostMan or make the following CURL posts:
`I, [2018-08-14T11:26:46.489303 #16280] INFO -- : Registered expected interaction GET /6/categories D, [2018-08-14T11:26:46.489303 #16280] DEBUG -- : { "description": "General Meetup Categories 6", "providerState": "A GET request to return JSON using Meetups category api under version 2 6", "request": { "method": "GET", "path": "/6/categories", "headers": { "Content-Type": "application/json" } }, "response": { "status": 200, "headers": { "Content-Type": "application/json" }, "body": { "results": { "name": "Games", "sort_name": "Games", "id": 11, "shortname": "Games" } } } }```
There results missing version 2.0.0