mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
28 lines
565 B
Bash
28 lines
565 B
Bash
#!/usr/bin/env bash
|
|
|
|
SRC=$(cd $(dirname "$0"); pwd)
|
|
source "${SRC}/include.sh"
|
|
|
|
cd $file_path
|
|
|
|
############# TEST
|
|
|
|
echo -e "\033[1mRunning tests:\033[0m"
|
|
|
|
## Start
|
|
$pm2 start child.js echo.js server.js
|
|
should 'should app be online' 'online' 3
|
|
|
|
## Restart
|
|
$pm2 restart child echo server
|
|
should 'should app be online' 'online' 3
|
|
should 'should all script been restarted one time' 'restart_time: 1' 3
|
|
|
|
## Stop
|
|
$pm2 stop child echo server
|
|
should 'should app be stopped' 'stopped' 3
|
|
|
|
## Delete
|
|
$pm2 delete child echo server
|
|
shouldnot 'should app be deleted' 'stopped' 3
|