mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Add inspect flag to api test script for debugging (#128275)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
126b140662
commit
3704642366
1 changed files with 16 additions and 2 deletions
|
@ -39,9 +39,22 @@ const { argv } = yargs(process.argv.slice(2))
|
|||
type: 'string',
|
||||
description: 'Specify the spec files to run',
|
||||
})
|
||||
.option('inspect', {
|
||||
default: false,
|
||||
type: 'boolean',
|
||||
description: 'Add --inspect-brk flag to the ftr for debugging',
|
||||
})
|
||||
.check((argv) => {
|
||||
const { inspect, runner } = argv;
|
||||
if (inspect && !runner) {
|
||||
throw new Error('--inspect can only be used with --runner');
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
})
|
||||
.help();
|
||||
|
||||
const { trial, server, runner, grep } = argv;
|
||||
const { trial, server, runner, grep, inspect } = argv;
|
||||
|
||||
const license = trial ? 'trial' : 'basic';
|
||||
console.log(`License: ${license}`);
|
||||
|
@ -53,8 +66,9 @@ if (server) {
|
|||
ftrScript = 'functional_test_runner';
|
||||
}
|
||||
|
||||
const inspectArg = inspect ? '--inspect-brk' : '';
|
||||
const grepArg = grep ? `--grep "${grep}"` : '';
|
||||
const cmd = `node ../../../../scripts/${ftrScript} ${grepArg} --config ../../../../test/apm_api_integration/${license}/config.ts`;
|
||||
const cmd = `node ${inspectArg} ../../../../scripts/${ftrScript} ${grepArg} --config ../../../../test/apm_api_integration/${license}/config.ts`;
|
||||
|
||||
console.log(`Running ${cmd}`);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue