Use a real-looking old-style correlator in the `generate-event` target
This commit is contained in:
parent
385fdd964d
commit
3c5104ecfd
2
Makefile
2
Makefile
|
@ -46,7 +46,7 @@ debug-db:
|
|||
$(COMPOSE) run --rm db psql -h db -U postgres uplink_development
|
||||
|
||||
generate-event:
|
||||
curl -d '{"type":"stapler", "correlator" : "my-correlator-id", "payload" : {"timestamp" : "$(shell date)", "hi" : "there"}}' \
|
||||
curl -d '{"type":"stapler", "correlator" : "86e3f00d-b12a-4391-bbf2-6f01c1606e17", "payload" : {"timestamp" : "$(shell date)", "hi" : "there"}}' \
|
||||
-H "Content-Type: application/json" \
|
||||
http://localhost:3030/events
|
||||
|
||||
|
|
|
@ -34,6 +34,15 @@ describe('Events service tests', () => {
|
|||
});
|
||||
|
||||
describe('POST to /events', () => {
|
||||
beforeEach(() => {
|
||||
const removalArgs = { query: { $limit: 1000 } };
|
||||
return app.service('events')
|
||||
.remove(null, removalArgs)
|
||||
.then(() => {
|
||||
return app.service('types').remove(null, removalArgs);
|
||||
});
|
||||
});
|
||||
|
||||
it('should create a valid event', () => {
|
||||
return request.post(getUrl('/events'), {
|
||||
json: true,
|
||||
|
|
Loading…
Reference in New Issue