Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add ability to exclude tests via ID in testExclusionList.json #8774

Merged
merged 9 commits into from
Oct 18, 2023
20 changes: 20 additions & 0 deletions spec/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,26 @@
}
};

var testExclusionList = [];

Check failure on line 431 in spec/helper.js

View workflow job for this annotation

GitHub Actions / Lint

Unexpected var, use let or const instead
mtrezza marked this conversation as resolved.
Show resolved Hide resolved
try {
// Fetch test exclusion list
testExclusionList = require('./testExclusionList.json');
console.log(`Using test exclusion list with ${testExclusionList.length} entries`);
} catch(error) {
if(error.code !== 'MODULE_NOT_FOUND') {
throw error;
}
}

// Bypass test if Test UUID found in testExclusionList
mtrezza marked this conversation as resolved.
Show resolved Hide resolved
global.it_id = id => {
if (testExclusionList.includes(id)) {
mtrezza marked this conversation as resolved.
Show resolved Hide resolved
return xit;
} else {
return it;
}
};

global.it_only_db = db => {
if (
process.env.PARSE_SERVER_TEST_DB === db ||
Expand Down
Loading