Closed YingzheHeBetty closed 3 years ago
Can you please try publishing it with the Pact Broker Client and see if you get the same error?
Hi Beth, thanks for your reply. Pact Broker Client doesn't work for me since the pact broker has a SSL cer. (If you could specify how to set env variables in a ruby project, that would be very helpful! ) I tried to publish using postman, got the same error.
Set the SSL_CERT_FILE environment variable and the client will work. You can see an example here https://github.com/DiUS/pact_broker-docker/blob/master/docker-compose.yml#L49
Works now after setting the environment variable! Thanks!
I have a pact file generated by a consumer in ruby:
{ "consumer": { "name": "CMM" }, "provider": { "name": "Analytics Service" }, "interactions": [ { "description": "a get request for Delivery Sources Metadata Report", "request": { "method": "get", "path": "/v1/cloud_ingestion/agencies/4d32d0e0-b477-4d9b-96b5-efba8a6eb957/reports/metadata/delivery_sources", "query": "" }, "response": { "status": 200, "headers": { "Content-Type": "text/csv" } } }, { "description": "a get request for a wrong Metadata Report", "request": { "method": "get", "path": "/v1/cloud_ingestion/agencies/431584dd-635f-44b8-9180-950a6b071a40/reports/metadata/line_item", "query": "" }, "response": { "status": 404, "headers": {} } }, { "description": "a get request for Creatives Metadata Report", "request": { "method": "get", "path": "/v1/cloud_ingestion/agencies/6e059492-58a0-405d-8850-7db0dcc1e228/reports/metadata/creatives", "query": "" }, "response": { "status": 200, "headers": { "Content-Type": "text/csv" } } }, { "description": "a get request for LineItem Metadata Report", "request": { "method": "get", "path": "/v1/cloud_ingestion/agencies/d35ad058-c859-420d-b869-02472c761feb/reports/metadata/line_items", "query": "" }, "response": { "status": 200, "headers": { "Content-Type": "text/csv" } } }, { "description": "a get request for Creatives Daily Delivery Report", "request": { "method": "get", "path": "/v1/cloud_ingestion/agencies/b1b92b3e-5273-4ac4-ba4b-9b8c40e5d452/reports/daily_delivery/creatives", "query": "startDate=2017-06-12&endDate=2017-06-18", "matchingRules": { "$.query.startDate[0]": { "match": "regex", "regex": "^\\d{4}-[01]\\d-[0-3]\\d$" }, "$.query.endDate[0]": { "match": "regex", "regex": "^\\d{4}-[01]\\d-[0-3]\\d$" } } }, "response": { "status": 200, "headers": { "Content-Type": "text/csv" } } } ], "metadata": { "pactSpecification": { "version": "2.0.0" } } }
when publishing it to the pact broker using HTTP request: curl -v -XPUT -H “Content-Type: application/json” -d@spec/pacts/cmm-analytics_service.json \https://pact-broker.prod.ourcentro.net:443/pacts/provider/Analytics%20Service/consumer/CMM/version/1.0.0
I got an error: