From af239c2521e1742e1cacfaa82ec7738af39de8ea Mon Sep 17 00:00:00 2001 From: Unitech Date: Wed, 13 Dec 2017 00:53:35 +0100 Subject: [PATCH] webuntest --- test/bash/cli-actions-1.sh | 62 ++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/test/bash/cli-actions-1.sh b/test/bash/cli-actions-1.sh index 21357119..af86c2b9 100644 --- a/test/bash/cli-actions-1.sh +++ b/test/bash/cli-actions-1.sh @@ -157,48 +157,50 @@ $pm2 list # spec "Should kill logs" -$pm2 web -spec "Should start web interface" +# $pm2 web +# spec "Should start web interface" -sleep 1 +# sleep 1 -JSON_FILE='/tmp/web-json' +# JSON_FILE='/tmp/web-json' -$http_get -q http://localhost:9615/ -O $JSON_FILE -cat $JSON_FILE | grep "HttpInterface.js" > /dev/null -spec "Should get the right JSON with HttpInterface file launched" +# $http_get -q http://localhost:9615/ -O $JSON_FILE +# cat $JSON_FILE | grep "HttpInterface.js" > /dev/null +# spec "Should get the right JSON with HttpInterface file launched" -$pm2 flush -spec "Should clean logs" +# $pm2 flush +# spec "Should clean logs" -# cat ~/.pm2/logs/echo-out.log | wc -l -# spec "File Log should be cleaned" +# # cat ~/.pm2/logs/echo-out.log | wc -l +# # spec "File Log should be cleaned" -sleep 1 -$http_get -q http://localhost:9615/ -O $JSON_FILE -cat $JSON_FILE | grep "restart_time\":0" > /dev/null -spec "Should get the right JSON with HttpInterface file launched" +# sleep 1 +# $http_get -q http://localhost:9615/ -O $JSON_FILE +# cat $JSON_FILE | grep "restart_time\":0" > /dev/null +# spec "Should get the right JSON with HttpInterface file launched" -# -# Restart only one process -# -$pm2 restart 1 -should 'should has restarted process' 'restart_time: 1' 1 +# # +# # Restart only one process +# # +# $pm2 restart 1 +# should 'should has restarted process' 'restart_time: 1' 1 -# -# Restart all processes -# -$pm2 restart all -spec "Should restart all processes" +# # +# # Restart all processes +# # +# $pm2 restart all +# spec "Should restart all processes" -sleep 1 -$http_get -q http://localhost:9615/ -O $JSON_FILE -OUT=`cat $JSON_FILE | grep -o "restart_time\":1" | wc -l` +# sleep 1 +# $http_get -q http://localhost:9615/ -O $JSON_FILE +# OUT=`cat $JSON_FILE | grep -o "restart_time\":1" | wc -l` -[ $OUT -eq 7 ] || fail "Error while wgeting data via web interface" -success "Got data from interface" +# [ $OUT -eq 7 ] || fail "Error while wgeting data via web interface" +# success "Got data from interface" +$pm2 start echo-env.js + $pm2 list $pm2 dump