Skip to content

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

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

Merged
merged 9 commits into from
Oct 18, 2023
12 changes: 10 additions & 2 deletions spec/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,16 @@ global.it_exclude_dbs = excluded => {
}
};

// Fetch test exclusion list
const testExclusionList = require('./testExclusionList.json');
var testExclusionList = [];
try {
// Fetch test exclusion list
testExclusionList = require('./testExclusionList.json');
console.log("testExclusionList.json Found")
} catch(error) {
if(error.code === "MODULE_NOT_FOUND") {
// Even though it says require, it's not. Don't fail
}
}

// Bypass test if Test UUID found in testExclusionList
global.it_id = id => {
Expand Down