Skip to content

Commit

Permalink
Merge branch '8.11' into backport/8.11/pr-170988
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Nov 22, 2023
2 parents 76c9029 + 36b40f0 commit e8e316e
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import * as t from 'io-ts';
import { isLeft } from 'fp-ts/lib/Either';
import { PathReporter } from 'io-ts/lib/PathReporter';
import globby from 'globby';
import del from 'del';

/**
* Updates the `name` and `classname` attributes of each testcase.
Expand Down Expand Up @@ -195,6 +196,9 @@ ${boilerplate}

if ('error' in maybeValidationResult) {
logError(maybeValidationResult.error);
// Sending broken XML to Failed Test Reporter will cause a job to fail
await del(path);
log.warning(`${path} file was deleted.`);
// If there is an error, continue trying to process other files.
continue;
}
Expand All @@ -203,9 +207,11 @@ ${boilerplate}

const { processed, hadTestCases } = isReportAlreadyProcessed(reportJson);
if (hadTestCases === false) {
log.warning(`${path} had no test cases. Skipping it.
log.warning(`${path} had no test cases.
${boilerplate}
`);
await del(path);
log.warning(`${path} file was deleted.`);
// If there is an error, continue trying to process other files.
continue;
}
Expand All @@ -222,6 +228,9 @@ ${boilerplate}

if ('error' in maybeSpecFilePath) {
logError(maybeSpecFilePath.error);
// Sending broken XML to Failed Test Reporter will cause a job to fail
await del(path);
log.warning(`${path} file was deleted.`);
// If there is an error, continue trying to process other files.
continue;
}
Expand Down

0 comments on commit e8e316e

Please sign in to comment.