Skip to content

Commit

Permalink
Add support for proper paths for all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
deepjyoti30-st committed Dec 4, 2024
1 parent 1be078d commit 874509b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
12 changes: 3 additions & 9 deletions .circleci/config_continue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ jobs:
type: string
fdi-version:
type: string
environment:
MOCHA_FILE: ~/test_report/report_node-<< parameters.fdi-version >>.xml
parallelism: 4
steps:
- checkout
Expand All @@ -61,7 +59,7 @@ jobs:
- run: update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-15.0.1/bin/javac" 2
- run: (cd .circleci/ && ./doUnitTests.sh << parameters.cdi-version >>)
- store_test_results:
path: ~/test_report/report_node-<< parameters.fdi-version >>.xml
path: ~/test_report/free-core-junit.xml
- slack/status
test-backend-sdk-testing:
docker:
Expand Down Expand Up @@ -92,8 +90,6 @@ jobs:
parameters:
fdi-version:
type: string
environment:
MOCHA_FILE: ~/test_report/report_node-<< parameters.fdi-version >>.xml
parallelism: 4
steps:
- checkout
Expand All @@ -105,7 +101,7 @@ jobs:
- run: update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-15.0.1/bin/javac" 2
- run: (cd .circleci/ && ./website.sh << parameters.fdi-version >>)
- store_test_results:
path: ~/test_report/report_node-<< parameters.fdi-version >>.xml
path: ~/test_report/website-junit.xml
- slack/status
test-authreact:
docker:
Expand All @@ -115,8 +111,6 @@ jobs:
parameters:
fdi-version:
type: string
environment:
MOCHA_FILE: ~/test_report/report_node-<< parameters.fdi-version >>.xml
parallelism: 4
steps:
- checkout
Expand All @@ -137,7 +131,7 @@ jobs:
path: ~/test_report/react-logs
destination: react-logs
- store_test_results:
path: ~/test_report/report_node-<< parameters.fdi-version >>.xml
path: ~/test_report/auth-react-junit.xml
- slack/status
test-success:
docker:
Expand Down
1 change: 0 additions & 1 deletion .circleci/setupAndTestBackendSDKWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ 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
ls -al ~/backend-sdk-testing/test-results

# kill test-server
kill $(lsof -t -i:$API_PORT)
3 changes: 2 additions & 1 deletion .circleci/setupAndTestWithAuthReact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ done
sleep 2 # Because the server is responding does not mean the app is ready. Let's wait another 2secs to make sure the app is up.
echo "Start mocha testing"

export multi="spec=- mocha-junit-reporter=/dev/null"
export MOCHA_FILE=~/test_report/auth-react-junit.xml
export multi="spec=- mocha-junit-reporter=$MOCHA_FILE"
export TEST_MODE=testing
export APP_SERVER=$apiPort
export SCREENSHOT_ROOT=~/test_report/screenshots
Expand Down
3 changes: 2 additions & 1 deletion .circleci/setupAndTestWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ export TEST_MODE=testing
export SUPERTOKENS_CORE_TAG=$coreTag
export NODE_PORT=8081
export INSTALL_PATH=../supertokens-root
export multi="spec=- mocha-junit-reporter=/dev/null"
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
3 changes: 2 additions & 1 deletion .circleci/setupAndTestWithFrontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export TEST_MODE=testing
export SUPERTOKENS_CORE_TAG=$coreTag
export NODE_PORT=8081
export INSTALL_PATH=../supertokens-root
export multi="spec=- mocha-junit-reporter=/dev/null"
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
Expand Down

0 comments on commit 874509b

Please sign in to comment.