-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/21.1' into feat/plugin/experiment
- Loading branch information
Showing
5 changed files
with
48 additions
and
19 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 |
---|---|---|
|
@@ -105,13 +105,20 @@ git clone [email protected]:supertokens/backend-sdk-testing.git | |
cd backend-sdk-testing | ||
git checkout $frontendDriverVersion | ||
npm install | ||
npm i mocha-multi mocha-junit-reporter | ||
npm run build | ||
|
||
if ! [[ -z "${CIRCLE_NODE_TOTAL}" ]]; then | ||
API_PORT=$API_PORT TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npx mocha --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --no-config --timeout 500000 $(npx mocha-split-tests -r ./runtime.log -t $CIRCLE_NODE_TOTAL -g $CIRCLE_NODE_INDEX -f 'test/**/*.test.js') | ||
else | ||
API_PORT=$API_PORT TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test | ||
fi | ||
export API_PORT=$API_PORT | ||
export TEST_MODE=testing | ||
export SUPERTOKENS_CORE_TAG=$coreTag | ||
export NODE_PORT=8081 | ||
export INSTALL_PATH=../supertokens-root | ||
export MOCHA_FILE=test-results/junit.xml | ||
export multi="spec=- mocha-junit-reporter=$MOCHA_FILE" | ||
|
||
mkdir -p test-results | ||
TEST_FILES=$(circleci tests glob "test/**/*.test.js") | ||
echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --reporter mocha-multi --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --timeout 500000 --no-config" --verbose --split-by=timings | ||
|
||
# kill test-server | ||
kill $(lsof -t -i:$API_PORT) |
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 |
---|---|---|
|
@@ -60,6 +60,7 @@ then | |
fi | ||
echo "Testing with FREE core: $coreVersion, plugin-interface: $pluginInterfaceVersion" | ||
|
||
mkdir -p ~/test_report | ||
cd ../../ | ||
git clone [email protected]:supertokens/supertokens-root.git | ||
cd supertokens-root | ||
|
@@ -84,12 +85,17 @@ cd ../ | |
echo $SUPERTOKENS_API_KEY > apiPassword | ||
./utils/setupTestEnvLocal | ||
cd ../project/ | ||
npm i mocha-multi mocha-junit-reporter | ||
|
||
# Set the script to exit on error | ||
set -e | ||
|
||
if ! [[ -z "${CIRCLE_NODE_TOTAL}" ]]; then | ||
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npx mocha --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --no-config --timeout 500000 $(npx mocha-split-tests -r ./runtime.log -t $CIRCLE_NODE_TOTAL -g $CIRCLE_NODE_INDEX -f 'test/**/*.test.js') | ||
else | ||
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test | ||
fi | ||
export TEST_MODE=testing | ||
export SUPERTOKENS_CORE_TAG=$coreTag | ||
export NODE_PORT=8081 | ||
export INSTALL_PATH=../supertokens-root | ||
export MOCHA_FILE=~/test_report/free-core-junit.xml | ||
export multi="spec=- mocha-junit-reporter=$MOCHA_FILE" | ||
|
||
TEST_FILES=$(circleci tests glob "test/**/*.test.js") | ||
echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --reporter mocha-multi --node-option no-experimental-fetch --timeout 40000 --no-config" --verbose --split-by=timings |
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 |
---|---|---|
|
@@ -61,6 +61,8 @@ fi | |
|
||
echo "Testing with frontend website: $2, FREE core: $coreVersion, plugin-interface: $pluginInterfaceVersion" | ||
|
||
mkdir -p ~/test_report | ||
|
||
cd ../../ | ||
git clone [email protected]:supertokens/supertokens-root.git | ||
cd supertokens-root | ||
|
@@ -96,11 +98,15 @@ npm i | |
cd ../../ | ||
npm i -d | ||
|
||
if ! [[ -z "${CIRCLE_NODE_TOTAL}" ]]; then | ||
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npx mocha --exit --no-config --require isomorphic-fetch --timeout 500000 $(npx mocha-split-tests -r ./runtime.log -t $CIRCLE_NODE_TOTAL -g $CIRCLE_NODE_INDEX -f 'test/*.test.js') | ||
else | ||
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test | ||
fi | ||
export TEST_MODE=testing | ||
export SUPERTOKENS_CORE_TAG=$coreTag | ||
export NODE_PORT=8081 | ||
export INSTALL_PATH=../supertokens-root | ||
export MOCHA_FILE=~/test_report/website-junit.xml | ||
export multi="spec=- mocha-junit-reporter=$MOCHA_FILE" | ||
|
||
TEST_FILES=$(circleci tests glob "test/*.test.js") | ||
echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha npx mocha --exit --reporter mocha-multi --no-config --require isomorphic-fetch --timeout 500000" --verbose --split-by=timings | ||
|
||
if [[ $? -ne 0 ]] | ||
then | ||
|