-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Options attrs updatable via CLI and JSON - small refactor for program…
…matic usage
- Loading branch information
Showing
17 changed files
with
175 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env bash | ||
|
||
SRC=$(cd $(dirname "$0"); pwd) | ||
source "${SRC}/include.sh" | ||
|
||
echo -e "\033[1mRunning tests:\033[0m" | ||
|
||
cd $file_path | ||
|
||
$pm2 kill | ||
|
||
$pm2 start app-config-update/args1.json | ||
$pm2 prettylist | grep "node_args: \[\]" | ||
spec "Should application have empty node argument list" | ||
|
||
$pm2 restart app-config-update/args2.json | ||
$pm2 prettylist | grep "node_args: \[ '--harmony' \]" | ||
spec "Should application have one node argument" | ||
|
||
$pm2 delete all | ||
|
||
$pm2 start app-config-update/echo.js | ||
$pm2 prettylist | grep "node_args: \[\]" | ||
spec "Should application have empty node argument list" | ||
|
||
$pm2 restart app-config-update/echo.js --node-args="--harmony" | ||
$pm2 prettylist | grep "node_args: \[ '--harmony' \]" | ||
spec "Should application have one node argument" | ||
|
||
# Variation with pm2 start that restarts an app | ||
$pm2 start echo --node-args="--harmony --harmony-proxies" | ||
$pm2 prettylist | grep "node_args: \[ '--harmony', '--harmony-proxies' \]" | ||
spec "Should application have one node argument" | ||
|
||
# | ||
# Rename | ||
# | ||
$pm2 restart 0 --name="new-name" | ||
$pm2 reset all | ||
$pm2 restart new-name | ||
should 'should restart processes with new name' 'restart_time: 1' 1 | ||
|
||
$pm2 start 0 --name="new-name-2" | ||
$pm2 reset all | ||
$pm2 restart new-name-2 | ||
should 'should restart processes with new name' 'restart_time: 1' 1 | ||
|
||
$pm2 delete all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"script" : "echo.js", | ||
"node_args" : "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"script" : "echo.js", | ||
"node_args" : "--harmony" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
var i = 0; | ||
setInterval(function() { | ||
console.log('ok', i++); | ||
}, 2000); | ||
|
||
console.log('ok'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[{ | ||
"name" : "env", | ||
"name" : "appname", | ||
"script" : "./env.js", | ||
"out_file" : "out-env.log", | ||
"merge_logs" : true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[{ | ||
"name" : "env", | ||
"name" : "appname", | ||
"script" : "./env.js", | ||
"out_file" : "out-env.log", | ||
"merge_logs" : true, | ||
|
Oops, something went wrong.