Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event.json should accept array #283

Closed
demian85 opened this issue May 17, 2017 · 4 comments
Closed

event.json should accept array #283

demian85 opened this issue May 17, 2017 · 4 comments

Comments

@demian85
Copy link

Is there a away to allow event.json file to have an array of events instead? I just want to test many cases with a simple command.
The only way I came up with is to manually execute run cmd passing different files as parameters.

Thanks.

@abetomo
Copy link
Contributor

abetomo commented May 18, 2017

@demian85

How about in a corresponding way with npm run or shell script?

Prepare an event file with a certain rule. (Such as event_test1.json, event_test2.json, ...)
There is a way to make the following shell script which executes those files serially.

for eventfile in event_test*.json; do node-lambda run -j ${eventfile}; done

Also, if you write similar contents in package.json you can do it with npm run.

...
  "scripts": {
    ...
    "multipleEventsTest": "for eventfile in event_test*.json; do node-lambda run -j ${eventfile}; done"
  },
...
$ npm run multipleEventsTest

@DeviaVir
Copy link
Collaborator

Closing due to no response registered after a possible solution has been offered. Feel free to comment in case the issue persisted.

@demian85
Copy link
Author

demian85 commented Jun 7, 2017

Yeah it woks, but would be cleaner if event.json accepts an array of events, or perhaps add events.json as another feature.

@DeviaVir DeviaVir reopened this Jun 7, 2017
@DeviaVir DeviaVir changed the title How to test multiple events? event.json should accept array Jun 7, 2017
This was referenced Jun 8, 2017
@abetomo
Copy link
Contributor

abetomo commented Jun 8, 2017

@demian85
If there is an array in event.json, we modified it to treat it as multiple events. #311

@DeviaVir DeviaVir closed this as completed Jun 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants