regression-tests: update custom mocha reporter to exit rather than mocha itself
There are no commits yet
Push commits to the source branch or add previously merged commits to review them.
Created by: burmudar
The custom mocha reporter didn't run for Sourcegraph QA tests aka client-regression tests. I dug into why and it comes down to:
yarn run test:regression mocha --exit
--exit
means upon any test failure mocha will exit with a non-zero exit code--exit
essentially invokes process.exit
which leads to any files that are open to not be properly closedSince process.exit
doesn't allow any file to properly get closed, customMochaSpecReporter
was not able to write all its contents to it's destination file.
The regression test configuration assumes that is being invoked from the client/web
directory, which means when mocha starts up, it doesn't see the .mochajs
file in the root of the repository.
--config
option on the test:regression mocha
which points to the root .mochajs
test:regression
it has been updated to use absolute paths by determining the root of the directorycustomMochaSpecReporter
assumed that it was always being executed from the root of the directory but it now determines the root of the repo to ensure the annotation is always written to the root annotations directorysg.config.overwrite.yaml
tests:
qa:
cmd:
./dev/ci/integration/qa/test.sh ${SOURCEGRAPH_BASE_URL}
env:
TEST_USER_EMAIL: test@sourcegraph.com
TEST_USER_PASSWORD: supersecurepassword
SOURCEGRAPH_BASE_URL: https://sourcegraph.test:3443
SOURCEGRAPH_SUDO_USER: admin
BROWSER: chrome
sg start enterprise-e2e
sg tests qa
Check out the client app preview documentation to learn more.
Push commits to the source branch or add previously merged commits to review them.