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

programmatic api tests are not testing real scenario #712

Closed
ahmadnassri opened this issue Sep 16, 2014 · 2 comments
Closed

programmatic api tests are not testing real scenario #712

ahmadnassri opened this issue Sep 16, 2014 · 2 comments
Assignees
Labels

Comments

@ahmadnassri
Copy link
Contributor

try with a fresh environment without the ~/.pm2 folder and run a programmatic setup, it fails with many errors related to the ~/.pm2 folder, and does not create the ~/.pm2 folder and log files automatically.

the unit test coverage forces pm2 kill to run thus not covering this error.

@soyuka
Copy link
Collaborator

soyuka commented Oct 3, 2014

+1 ran into this issue a few days ago. If you run a fresh environment and run pm2 as a node module (programatically) it'll fail.

PM2 should check if the folder exists before every task and, if not, init himself.

To summer up:

https://github.com/Unitech/PM2/blob/master/bin/pm2#L22 (init function) should be called with the programmatic API.

@soyuka soyuka self-assigned this Oct 3, 2014
Unitech added a commit that referenced this issue Oct 10, 2014
soyuka pushed a commit to soyuka/pm2 that referenced this issue Nov 21, 2014
soyuka pushed a commit that referenced this issue Nov 21, 2014
@Unitech
Copy link
Owner

Unitech commented Nov 22, 2016

fixed in latest PM2

@Unitech Unitech closed this as completed Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants