#!/usr/bin/env bash

set -e;

APP_DIR=tests/integration/app;

# Start server
# ============
pushd "${APP_DIR}" > /dev/null;

echo
echo "travis_fold:start:integration.npm.install";
if [ ! -d 'node_modules' ]; then
	npm install -d;
else
	if [ -d 'node_modules/sails-mysql-transactions' ]; then
		rm -rf 'node_modules/sails-mysql-transactions';
	fi
	npm run postinstall;
fi
echo
echo "travis_fold:end:integration.npm.install";

npm start;
popd > /dev/null;

# Begin Test
# ==========

newman -c tests/integration/sanity.json.postman_collection -e tests/integration/sails-transactions-experiment.postman_environment


# Stop Server
# ===========

pushd "${APP_DIR}" > /dev/null;
npm stop;
popd > /dev/null;
#!/usr/bin/env bash

set -e;

APP_DIR=tests/integration/app;

# Start server
# ============
pushd "${APP_DIR}" > /dev/null;

echo
echo -en 'travis_fold:start:integration.npm.install\\r';
if [ ! -d 'node_modules' ]; then
	npm install -d;
else
	if [ -d 'node_modules/sails-mysql-transactions' ]; then
		rm -rf 'node_modules/sails-mysql-transactions';
	fi
	npm run postinstall;
fi
echo
echo -en 'travis_fold:end:integration.npm.install\\r';

npm start;
popd > /dev/null;

# Begin Test
# ==========

newman -c tests/integration/sanity.json.postman_collection -e tests/integration/sails-transactions-experiment.postman_environment


# Stop Server
# ===========

pushd "${APP_DIR}" > /dev/null;
npm stop;
popd > /dev/null;
--- 
+++ 
@@ -9,7 +9,7 @@
 pushd "${APP_DIR}" > /dev/null;
 
 echo
-echo -en 'travis_fold:start:integration.npm.install\\r';
+echo "travis_fold:start:integration.npm.install";
 if [ ! -d 'node_modules' ]; then
 	npm install -d;
 else
@@ -19,7 +19,7 @@
 	npm run postinstall;
 fi
 echo
-echo -en 'travis_fold:end:integration.npm.install\\r';
+echo "travis_fold:end:integration.npm.install";
 
 npm start;
 popd > /dev/null;
Update Travis fold echo to force newline at end.
