Skip to content

Commit

Permalink
chore(#8706): split integration test job
Browse files Browse the repository at this point in the history
  • Loading branch information
garethbowen authored Nov 16, 2023
1 parent d3d94be commit 725a24c
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
strategy:
fail-fast: false
matrix:
cmd: ['ci-webdriver-standard', 'ci-e2e-integration', 'ci-webdriver-default-mobile']
cmd: ['ci-webdriver-standard', 'ci-integration-all', 'ci-integration-sentinel', 'ci-webdriver-default-mobile']
chrome-version: ['90', 'latest']
suite: [all]
include:
Expand All @@ -112,7 +112,9 @@ jobs:
- cmd: ci-webdriver-default
suite: workflows
exclude: # temporary until all suites run on Chrome 90
- cmd: ci-e2e-integration
- cmd: ci-integration-all
chrome-version: 90
- cmd: ci-integration-sentinel
chrome-version: 90
- cmd: ci-webdriver-default-mobile
chrome-version: 90
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"-- CI SCRIPTS ": "-----------------------------------------------------------------------------------------------",
"build": "./scripts/build/build-ci.sh",
"ci-compile": "node scripts/ci/check-versions.js && node scripts/build/cli npmCiModules && npm run lint && npm run build && npm run integration-api && npm run unit",
"ci-e2e-integration": "mocha --config tests/integration/.mocharc.js",
"ci-integration-all": "mocha --config tests/integration/.mocharc-all.js",
"ci-integration-sentinel": "mocha --config tests/integration/.mocharc-sentinel.js",
"ci-webdriver-default": "wdio run ./tests/e2e/default/wdio.conf.js",
"ci-webdriver-default-mobile": "wdio run ./tests/e2e/default-mobile/wdio.conf.js",
"ci-webdriver-standard": "wdio run ./tests/e2e/standard/wdio.conf.js",
Expand Down
9 changes: 9 additions & 0 deletions tests/integration/.mocharc-all.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const baseConfig = require('./.mocharc-base');

module.exports = {
...baseConfig,
spec: [
'tests/integration/!(cht-conf|sentinel)/**/*.spec.js', // run everything except the sentinel tests - those are tested in .mocharc-sentinel.js
'tests/integration/cht-conf/**/*.spec.js', // Executing last to not side-effect sentinel tests.
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ module.exports = {
fullTrace: true,
asyncOnly: false,
spec: [
'tests/integration/!(cht-conf)/**/*.spec.js',
'tests/integration/cht-conf/**/*.spec.js', // Executing last to not side-effect sentinel tests.
// extend this file and overwrite this property with the specs you want to run
],
timeout: 200 * 1000, //API takes a little long to start up
reporter: 'spec',
Expand Down
6 changes: 6 additions & 0 deletions tests/integration/.mocharc-sentinel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const baseConfig = require('./.mocharc-base');

module.exports = {
...baseConfig,
spec: [ 'tests/integration/sentinel/**/*.spec.js' ],
};
1 change: 0 additions & 1 deletion tests/integration/api/controllers/all-docs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ describe('all_docs handler', () => {
))
]))
.then(([excludeDocs, includeDocs]) => {
console.log(JSON.stringify(excludeDocs, null, 2));
expect(excludeDocs.rows.map(row => row.id)).to.have.members(getIdsForUser('offline'));
expect(includeDocs.rows.map(row => row.id)).to.have.members(getIdsForUser('offline'));
});
Expand Down
1 change: 0 additions & 1 deletion tests/integration/api/controllers/db-doc.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,6 @@ describe('db-doc handler', () => {
if (reportScenarios[idx].allowed) {
chai.expect(result).to.deep.include(reportScenarios[idx].doc);
} else {
console.log(idx, result);
chai.expect(result).to.deep.nested.include({ statusCode: 403, 'responseBody.error': 'forbidden'});
}
});
Expand Down
1 change: 0 additions & 1 deletion tests/integration/infodocs/infodocs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ describe('infodocs', () => {
assert.equal(infodoc.some, 'legacy data');
});
}).catch(err => {
console.log('OH NOOOOO', err);
console.log(err);
throw err;
});
Expand Down

0 comments on commit 725a24c

Please sign in to comment.