Releases: quii/mockingjay-server
Fix auto cdc in UI
- Sometimes the auto CDC check was not firing in the UI
- Disabled curl label from UI as it seems pretty buggy
Beta version of mockingjay UI
You can now hit /mj-admin and find a UI to configure Mockingjay!
It should work fine, the only known issues at the moment are the rendering in browsers other than Chrome.
In this release are some other bug fixes and performance improvements.
(this one fixes a derp-y release)
Beta version of mockingjay UI
You can now hit /mj-admin
and find a UI to configure Mockingjay!
It should work fine, the only known issues at the moment are the rendering in browsers other than Chrome.
In this release are some other bug fixes and performance improvements.
Fix request hash to include form details
If you have two endpoints equal apart from the form, they will be seen as equal (i.e duplicate). Not after this release.
Wildcard for config filepaths
You can now use glob style wildcard paths with mockingjay!
Why?
If you are maintaining a service used by various teams, you might get lots of config files for CDCs. It is tedious to have to run mockingjay for each file you get, it would be much easier to dump them all in a directory and let MJ take care of the test. Well now you can.
Example
If you look at /examples/issue40
you will see two config files
---
- name: Hello, world
request:
uri: /hello
method: GET
response:
code: 200
body: 'world'
and
---
- name: Delete, world
request:
uri: /world
method: DELETE
response:
code: 200
Start up a server with the first file in one tab mockingjay-server -config=examples/issue40/1.yaml
If you then run a compatibility check (CDC) with the same file
mockingjay-server -config=examples/issue40/1.yaml -realURL=http://localhost:9090
mocking-jay: 2016/08/09 15:47:09 ✓ Hello, world (GET /hello Form: map[] Headers: map[]) is compatible with http://localhost:9090
mocking-jay: 2016/08/09 15:47:09 All endpoints are compatible
It is of course, compatible with itself. Now lets try a wildcard to include the other config in that directory.
mockingjay-server -config=examples/issue40/*.yaml -realURL=http://localhost:9090
mocking-jay: 2016/08/09 15:49:20 ✓ Hello, world (GET /hello Form: map[] Headers: map[]) is compatible with http://localhost:9090
mocking-jay: 2016/08/09 15:49:20 ✗ Delete, world (DELETE /world Form: map[] Headers: map[]) is incompatible with http://localhost:9090
mocking-jay: 2016/08/09 15:49:20 Got 404 expected 200
2016/08/09 15:49:20 At least one endpoint was incompatible with the real URL supplied
Now the DELETE
endpoint has been included because of the wildcard match and so the check fails.
Thanks to @aceakash for the good idea :)
Debug mode
When starting MJ you can now do -debug=true
to get additional information on request matching
Fixes output when form doesn't match
1.7.1 fix problem where form isnt included in debug output when not matching
New syntax for forms
This addresses #46 which is a usability issue. If you wanted to send form data you would have to put in your config a URL encoded string as the body. Which is super flaky, hard to read and generally awful.
Now there is syntax for forms!
- name: Posting forms
cdcdisabled: false
request:
uri: /cats
method: POST
form:
age: 10
name: Hudson
response:
code: 201
body: Created
The caller will need to send the data with the content type of application/x-www-form-urlencoded
1.6.1
Requests with JSON bodies now space insensitive
1.6.0 this fixes issue #37