@pact-foundation/pact 9.17.0 → 9.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +36 -15
- package/package.json +1 -1
- package/src/dsl/interaction.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [9.17.1](https://github.com/pact-foundation/pact-js/compare/v9.17.0...v9.17.1) (2021-12-31)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Fixes and Improvements
|
|
9
|
+
|
|
10
|
+
* Interaction response status can only be a number not a Matcher (Typescript type) ([9904eca](https://github.com/pact-foundation/pact-js/commit/9904eca5d25108ef714d279e4314e0797266536e))
|
|
11
|
+
|
|
5
12
|
## [9.17.0](https://github.com/pact-foundation/pact-js/compare/v9.16.5...v9.17.0) (2021-11-19)
|
|
6
13
|
|
|
7
14
|
|
package/README.md
CHANGED
|
@@ -80,7 +80,10 @@ Read [Getting started with Pact] for more information for beginners.
|
|
|
80
80
|
- [Verifying providers with VerifierV3](#verifying-providers-with-verifierv3)
|
|
81
81
|
- [Request Filters](#request-filters)
|
|
82
82
|
- [Provider state callbacks](#provider-state-callbacks)
|
|
83
|
+
- [Debugging issues with Pact-JS V3](#debugging-issues-with-pact-js-v3)
|
|
84
|
+
- [Debugging](#debugging)
|
|
83
85
|
- [Troubleshooting / FAQs](#troubleshooting--faqs)
|
|
86
|
+
- [Corporate Proxies / Firewalls](#corporate-proxies--firewalls)
|
|
84
87
|
- [Alpine + Docker](#alpine--docker)
|
|
85
88
|
- [Parallel tests](#parallel-tests)
|
|
86
89
|
- [Splitting tests across multiple files](#splitting-tests-across-multiple-files)
|
|
@@ -90,7 +93,6 @@ Read [Getting started with Pact] for more information for beginners.
|
|
|
90
93
|
- [Timeout](#timeout)
|
|
91
94
|
- [Usage with Jest](#usage-with-jest)
|
|
92
95
|
- [Usage with Angular](#usage-with-angular)
|
|
93
|
-
- [Debugging](#debugging)
|
|
94
96
|
- [Contributing](#contributing)
|
|
95
97
|
- [Contact](#contact)
|
|
96
98
|
|
|
@@ -1210,10 +1212,43 @@ stateHandlers: {
|
|
|
1210
1212
|
|
|
1211
1213
|
You can change the log levels using the `LOG_LEVEL` environment variable.
|
|
1212
1214
|
|
|
1215
|
+
### Debugging
|
|
1216
|
+
|
|
1217
|
+
If your standard tricks don't get you anywhere, setting the logLevel to `debug` and increasing the timeout doesn't help and you don't know where else to look, it could be that the binaries we use to do much of the Pact magic aren't starting as expected.
|
|
1218
|
+
|
|
1219
|
+
Try starting the mock service manually and seeing if it comes up. When submitting a bug report, it would be worth running these commands before hand as it will greatly help us:
|
|
1220
|
+
|
|
1221
|
+
```
|
|
1222
|
+
./node_modules/.bin/pact-mock-service
|
|
1223
|
+
```
|
|
1224
|
+
|
|
1225
|
+
...and also the verifier (it will whinge about missing params, but that means it works):
|
|
1226
|
+
|
|
1227
|
+
```
|
|
1228
|
+
./node_modules/.bin/pact-provider-verifier
|
|
1229
|
+
```
|
|
1230
|
+
|
|
1213
1231
|
## Troubleshooting / FAQs
|
|
1214
1232
|
|
|
1215
1233
|
If you are having issues, a good place to start is setting `logLevel: 'debug'` when configuring the `new Pact({...})` object. This will give you detailed in/out requests as far as Pact sees them during verification.
|
|
1216
1234
|
|
|
1235
|
+
### Corporate Proxies / Firewalls
|
|
1236
|
+
|
|
1237
|
+
If you're on a corporate machine, it's common for all network calls to route through a proxy - even requests that go to your own machine!
|
|
1238
|
+
|
|
1239
|
+
The symptom presents as follows:
|
|
1240
|
+
|
|
1241
|
+
1. The mock server starts up correctly, as shown by a debug level log message such as this:
|
|
1242
|
+
|
|
1243
|
+
```
|
|
1244
|
+
[2021-11-22 11:16:01.214 +0000] DEBUG (3863 on Matts-iMac): pact-core@11.0.1: INFO WEBrick::HTTPServer#start: pid=3864 port=50337
|
|
1245
|
+
```
|
|
1246
|
+
2. You receive a conflicting message such as "The pact mock service doesn't appear to be running" and the tests never run or any before all blocks fail to complete.
|
|
1247
|
+
|
|
1248
|
+
The problem is that the Pact framework attempts to ensure the mock service can be communicated with before the tests run. It does so via an HTTP call, which will be sent via any intermediate proxies if configured. The proxy is unlikely to know how send the request back to your machine, which results in a timeout or error.
|
|
1249
|
+
|
|
1250
|
+
This may be resolved by ensuring the `http_proxy` and `no_proxy` directives are correctly set (usually, by excluding the address of the mock server such as `localhost` or `127.0.0.1`).
|
|
1251
|
+
|
|
1217
1252
|
### Alpine + Docker
|
|
1218
1253
|
|
|
1219
1254
|
See https://docs.pact.io/docker/.
|
|
@@ -1380,21 +1415,7 @@ You'll need to add the additional header `Access-Control-Expose-Headers`, this w
|
|
|
1380
1415
|
|
|
1381
1416
|
See [this issue](https://github.com/angular/angular/issues/13554) for background.
|
|
1382
1417
|
|
|
1383
|
-
### Debugging
|
|
1384
|
-
|
|
1385
|
-
If your standard tricks don't get you anywhere, setting the logLevel to `debug` and increasing the timeout doesn't help and you don't know where else to look, it could be that the binaries we use to do much of the Pact magic aren't starting as expected.
|
|
1386
|
-
|
|
1387
|
-
Try starting the mock service manually and seeing if it comes up. When submitting a bug report, it would be worth running these commands before hand as it will greatly help us:
|
|
1388
1418
|
|
|
1389
|
-
```
|
|
1390
|
-
./node_modules/.bin/pact-mock-service
|
|
1391
|
-
```
|
|
1392
|
-
|
|
1393
|
-
...and also the verifier (it will whinge about missing params, but that means it works):
|
|
1394
|
-
|
|
1395
|
-
```
|
|
1396
|
-
./node_modules/.bin/pact-provider-verifier
|
|
1397
|
-
```
|
|
1398
1419
|
|
|
1399
1420
|
## Contributing
|
|
1400
1421
|
|
package/package.json
CHANGED