-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# Set any error to exit non-zero | ||
set -e | ||
# Perform reset operations now, before we start issuing exit codes | ||
|
||
# Clear out any previous runtime JSON files | ||
rm -f $APP_DIR/*.json | ||
|
||
# Clear out any previous runtime-created modules | ||
rm -rf $APP_DIR/modules | ||
|
||
cd ${APP_DIR} | ||
|
||
export BOX_SERVER_RUNWAR_CONSOLE_APPENDERLAYOUT="JSONTemplateLayout" | ||
|
||
echo "Starting server with JSON logging enabled" | ||
|
||
runOutput="$( ${BUILD_DIR}/run.sh )" | ||
|
||
printf '%s\n' "${runOutput}" | ||
|
||
$BUILD_DIR/tests/test.up.sh | ||
|
||
if [[ ${runOutput} != *"\"level\": \"INFO\""* ]];then | ||
echo "JSON Template layout was not activated successfully" | ||
exit 1 | ||
fi | ||
|
||
# cleanup | ||
unset BOX_SERVER_RUNWAR_CONSOLE_APPENDERLAYOUT | ||
box server stop |