Skip to content

Commit

Permalink
fix scalability config and config_path import
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Sep 21, 2022
1 parent bf20987 commit f582cf8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion packages/kbn-test/src/functional_tests/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
export { runKibanaServer } from './run_kibana_server';
export { runElasticsearch } from './run_elasticsearch';
export * from './run_ftr';
export * from './config_path';
3 changes: 2 additions & 1 deletion packages/kbn-test/src/functional_tests/start_servers/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ import { startServers } from './start_servers';
*/
export function startServersCli() {
run(
async ({ flags, log }) => {
async ({ flagsReader: flags, log }) => {
const options = parseFlags(flags);

if (options.logsDir) {
initLogsDir(log, options.logsDir);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-test/src/functional_tests/start_servers/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
* Side Public License, v 1.
*/

import { Flags } from '@kbn/dev-cli-runner';
import { FlagsReader } from '@kbn/dev-cli-runner';
import { createFlagError } from '@kbn/dev-cli-errors';

import { parseFlags as parseRunTestFlags } from '../run_tests/flags';

export type StartServerOptions = ReturnType<typeof parseFlags>;

export function parseFlags(flags: Flags) {
export function parseFlags(flags: FlagsReader) {
const { configs, esFrom, esVersion, installDir, logsDir } = parseRunTestFlags(flags);

if (configs.length !== 1) {
Expand Down
9 changes: 5 additions & 4 deletions x-pack/test/scalability/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ const gatlingProjectRootPath: string =
process.env.GATLING_PROJECT_PATH || path.resolve(REPO_ROOT, '../kibana-load-testing');

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseConfig = (
await readConfigFile(require.resolve('../functional/config.base.js'))
).getAll();

if (!fs.existsSync(gatlingProjectRootPath)) {
throw createFlagError(
`Incorrect path to load testing project: '${gatlingProjectRootPath}'\n
Expand All @@ -39,10 +35,15 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
);
}

const baseConfig = (
await readConfigFile(require.resolve('../../performance/journeys/login.ts'))
).getAll();

return {
...baseConfig,

services: commonFunctionalServices,
pageObjects: {},

testRunner: (context: FtrProviderContext) =>
ScalabilityTestRunner(context, scalabilityJsonPath, gatlingProjectRootPath),
Expand Down

0 comments on commit f582cf8

Please sign in to comment.