mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
37 lines
870 B
Bash
37 lines
870 B
Bash
|
|
#!/usr/bin/env bash
|
|
|
|
SRC=$(cd $(dirname "$0"); pwd)
|
|
source "${SRC}/include.sh"
|
|
|
|
cd $file_path
|
|
|
|
#
|
|
# Test for SMART start
|
|
#
|
|
|
|
$pm2 start echo.js
|
|
should 'process should have been started' 'restart_time: 0' 1
|
|
should 'process should have been started' 'online' 1
|
|
|
|
$pm2 stop echo
|
|
should 'process should have been started' 'stopped' 1
|
|
|
|
$pm2 start echo
|
|
should 'process should have been started' 'online' 1
|
|
|
|
$pm2 start echo
|
|
should 'process should have been started' 'restart_time: 1' 1
|
|
should 'process should have been started' 'online' 1
|
|
|
|
$pm2 start 0
|
|
should 'process should have been started' 'restart_time: 2' 1
|
|
should 'process should have been started' 'online' 1
|
|
|
|
# $pm2 stop echo
|
|
# should 'process should have been started' 'stopped' 1
|
|
|
|
# $pm2 start all
|
|
# should 'process should have been started' 'restart_time: 2' 1
|
|
# should 'process should have been started' 'online' 1
|