v1.7.0
New Features
- Added an
mb save
command to persist the existing configuration of imposters - Added the ability to add latency to saved responses from proxies based on the actual time it took to call the downstream endpoint
- Added the ability to override the default response for imposters, including overriding
the default
Connection: close
http header - Added a
--noParse
command line option that prevents parsing config files as templates - Added a
--nologfile
command line parameter to prevent logging to the filesystem - Allow changing the cipher for https proxies
Bug Fixes
- An
xpath exists
predicate will return true if the XML tag exists, even if it does not have any text data. - Fix Content-Length header if a
decorate
behavior changes it from the original - Fix
repeat
behavior when used with headers - Fix
repeat
behavior so that it loops back to the beginning of theresponses
array when it reaches the end, to keep it consistent with the circular buffer behavior - Fixed missing documentation, including on the contracts page
- Don't default to chunked encoding on http proxy calls
Many thanks to the following kind folk for help with this release:
Install
npm install -g mountebank@1.7.0
or:
Option | node.js required? | sudo required? | links | Description |
---|---|---|---|---|
Self-contained archives | No | No | Simply unpack and run mb from inside |
|
OS-specific packages | No | Yes | Puts mb at /usr/local/bin , which is generally in the PATH . |
|
source tarball | Yes | No | source tarball if you roll that way. |
Windows path limitations
*mountebank wishes very much for your Windows experience to be hassle-free, but he is simply not qualified to address a particular constraint of Windows Explorer. For legacy reasons, some Windows applications, including most notably Windows Explorer, have a maximum number of characters allowed in a path of 260 characters. As mountebank writes these words, the longest path he includes in the zip files is around 175 characters. The zip file name, which is likely to represent itself as two nested directories if you use the defaults to unzip it, will be around 25 characters. That gives you very little wiggle room. If you unzip the file in your users directory, you may very likely get an error because of this constraint.
The following solutions will all work:
- Unzip to the root of your C: drive (or a similar small path)
- Use 7zip to unzip the file instead of Windows Explorer
- Use
npm
to install mountebank instead of the zip file