Skip to content

Commit

Permalink
Add test case for running cli out of default directory
Browse files Browse the repository at this point in the history
Signed-off-by: imjoey <majunjiev@gmail.com>
  • Loading branch information
imjoey committed Jan 4, 2021
1 parent 043d5b3 commit b891c9b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions api/test/shell/cli_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,28 @@ if [[ $res != "hi~" ]]; then
fi
clean_up

# run with -p flag out of the default directory
workDir=$(pwd)
rm -fr bin && mkdir bin
cp ./manager-api ./bin/
rm -rf html && mkdir html
cd html
echo "hi~" >> index.html
$workDir/bin/manager-api -p $workDir &
sleep 5

res=$(curl http://127.0.0.1:9000)
pkill -f manager-api
cd $workDir
rm -rf bin
rm -rf html

if [[ $res != "hi~" ]]; then
echo "failed: manager-api can't run with -p flag out of the default directory"
exit 1
fi
clean_up

# test start info

LOGLEVEL=$(cat conf/conf.yaml | awk '$1=="level:"{print $2}')
Expand Down

0 comments on commit b891c9b

Please sign in to comment.