Use a real-looking old-style correlator in the `generate-event` target

This commit is contained in:
R. Tyler Croy 2018-10-24 14:15:20 -07:00
parent 385fdd964d
commit 3c5104ecfd
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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,