[QA][Code Coverage] Drop flaky integration tests (#72089)

This commit is contained in:
Tre 2020-07-17 07:56:59 -06:00 committed by GitHub
parent 86629d76b0
commit 5160c7ee45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,96 +69,4 @@ describe('Ingesting coverage', () => {
expect(folderStructure.test(actualUrl)).ok();
});
});
describe(`vcsInfo`, () => {
let stdOutWithVcsInfo = '';
describe(`without a commit msg in the vcs info file`, () => {
beforeAll(async () => {
const args = [
'scripts/ingest_coverage.js',
'--verbose',
'--vcsInfoPath',
'src/dev/code_coverage/ingest_coverage/integration_tests/mocks/VCS_INFO_missing_commit_msg.txt',
'--path',
];
const opts = [...args, resolved];
const { stdout } = await execa(process.execPath, opts, { cwd: ROOT_DIR, env });
stdOutWithVcsInfo = stdout;
});
it(`should be an obj w/o a commit msg`, () => {
const commitMsgRE = /"commitMsg"/;
expect(commitMsgRE.test(stdOutWithVcsInfo)).to.not.be.ok();
});
});
describe(`including previous sha`, () => {
let stdOutWithPrevious = '';
beforeAll(async () => {
const opts = [...verboseArgs, resolved];
const { stdout } = await execa(process.execPath, opts, { cwd: ROOT_DIR, env });
stdOutWithPrevious = stdout;
});
it(`should have a vcsCompareUrl`, () => {
const previousCompareUrlRe = /vcsCompareUrl.+\s*.*https.+compare\/FAKE_PREVIOUS_SHA\.\.\.f07b34f6206/;
expect(previousCompareUrlRe.test(stdOutWithPrevious)).to.be.ok();
});
});
describe(`with a commit msg in the vcs info file`, () => {
beforeAll(async () => {
const args = [
'scripts/ingest_coverage.js',
'--verbose',
'--vcsInfoPath',
'src/dev/code_coverage/ingest_coverage/integration_tests/mocks/VCS_INFO.txt',
'--path',
];
const opts = [...args, resolved];
const { stdout } = await execa(process.execPath, opts, { cwd: ROOT_DIR, env });
stdOutWithVcsInfo = stdout;
});
it(`should be an obj w/ a commit msg`, () => {
const commitMsgRE = /commitMsg/;
expect(commitMsgRE.test(stdOutWithVcsInfo)).to.be.ok();
});
});
});
describe(`team assignment`, () => {
let shouldNotHavePipelineOut = '';
let shouldIndeedHavePipelineOut = '';
const args = [
'scripts/ingest_coverage.js',
'--verbose',
'--vcsInfoPath',
'src/dev/code_coverage/ingest_coverage/integration_tests/mocks/VCS_INFO.txt',
'--path',
];
const teamAssignRE = /pipeline:/;
beforeAll(async () => {
const summaryPath = 'jest-combined/coverage-summary-just-total.json';
const resolved = resolve(MOCKS_DIR, summaryPath);
const opts = [...args, resolved];
const { stdout } = await execa(process.execPath, opts, { cwd: ROOT_DIR, env });
shouldNotHavePipelineOut = stdout;
});
beforeAll(async () => {
const summaryPath = 'jest-combined/coverage-summary-manual-mix.json';
const resolved = resolve(MOCKS_DIR, summaryPath);
const opts = [...args, resolved];
const { stdout } = await execa(process.execPath, opts, { cwd: ROOT_DIR, env });
shouldIndeedHavePipelineOut = stdout;
});
it(`should not occur when going to the totals index`, () => {
const actual = teamAssignRE.test(shouldNotHavePipelineOut);
expect(actual).to.not.be.ok();
});
it(`should indeed occur when going to the coverage index`, () => {
const actual = /ingest-pipe=>team_assignment/.test(shouldIndeedHavePipelineOut);
expect(actual).to.be.ok();
});
});
});