Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski committed Aug 30, 2023
1 parent d790522 commit f1fee62
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
29 changes: 15 additions & 14 deletions x-pack/plugins/security_solution/scripts/run_cypress/parallel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,34 +63,35 @@ const retrieveIntegrations = (integrationsPaths: string[]) => {
export const cli = () => {
run(
async () => {
const { argv } = yargs(process.argv.slice(2)).coerce('env', (arg: string) =>
arg.split(',').reduce((acc, curr) => {
const [key, value] = curr.split('=');
if (key === 'burn') {
acc[key] = parseInt(value, 10);
} else {
acc[key] = value;
}
return acc;
}, {} as Record<string, string | number>)
);
const { argv } = yargs(process.argv.slice(2))
.coerce('spec', (arg) => (_.isArray(arg) ? [_.last(arg)] : [arg]))
.coerce('env', (arg: string) =>
arg.split(',').reduce((acc, curr) => {
const [key, value] = curr.split('=');
if (key === 'burn') {
acc[key] = parseInt(value, 10);
} else {
acc[key] = value;
}
return acc;
}, {} as Record<string, string | number>)
);

const isOpen = argv._[0] === 'open';
const cypressConfigFilePath = require.resolve(
`../../${_.isArray(argv.configFile) ? _.last(argv.configFile) : argv.configFile}`
) as string;
const cypressConfigFile = await import(cypressConfigFilePath);
const spec: string | undefined = argv?.spec as string;
const grepSpecPattern = grep({
...cypressConfigFile,
specPattern: spec ?? cypressConfigFile.e2e.specPattern,
specPattern: argv.spec ?? cypressConfigFile.e2e.specPattern,
excludeSpecPattern: [],
}).specPattern;

let files = retrieveIntegrations(
_.isArray(grepSpecPattern)
? grepSpecPattern
: globby.sync(spec ? [spec] : cypressConfigFile.e2e.specPattern)
: globby.sync(argv.spec ?? cypressConfigFile.e2e.specPattern)
);

if (argv.changedSpecsOnly) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const rolesToCreate = [secReadCasesAll];
const siemDataViewTitle = 'Security Default Data View';
const dataViews = ['auditbeat-*,fakebeat-*', 'auditbeat-*,*beat*,siem-read*,.kibana*,fakebeat-*'];

describe('Sourcerer', { tags: ['@brokenInServerless'] }, () => {
describe('Sourcerer', () => {
before(() => {
cy.task('esArchiverResetKibana');
dataViews.forEach((dataView: string) => postDataView(dataView));
Expand Down

0 comments on commit f1fee62

Please sign in to comment.