Skip to content

Commit ef2be2c

Browse files
mshustovkibanamachinespalger
authored
server logs config paths to use for runner (#52980)
* server logs config paths to use for runner * fix eslint issue * do not log config path for default config * update snapshots * fix other tests Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: spalger <[email protected]>
1 parent 72fa61b commit ef2be2c

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

packages/kbn-test/src/functional_tests/cli/start_servers/__snapshots__/args.test.js.snap

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/kbn-test/src/functional_tests/cli/start_servers/args.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export function displayHelp() {
7575
export function processOptions(userOptions, defaultConfigPath) {
7676
validateOptions(userOptions);
7777

78-
const config = userOptions.config || defaultConfigPath;
78+
const useDefaultConfig = !userOptions.config;
79+
const config = useDefaultConfig ? defaultConfigPath : userOptions.config;
7980

8081
if (!config) {
8182
throw new Error(`functional_tests_server: config is required`);
@@ -100,6 +101,7 @@ export function processOptions(userOptions, defaultConfigPath) {
100101
return {
101102
...userOptions,
102103
config: resolve(config),
104+
useDefaultConfig,
103105
createLogger,
104106
extraKbnOpts: userOptions._,
105107
};

packages/kbn-test/src/functional_tests/tasks.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,21 @@ import { readConfigFile } from '../functional_test_runner/lib';
3636

3737
const makeSuccessMessage = (options) => {
3838
const installDirFlag = options.installDir ? ` --kibana-install-dir=${options.installDir}` : '';
39+
const configPaths = Array.isArray(options.config) ? options.config : [options.config];
40+
const pathsMessage = options.useDefaultConfig
41+
? ''
42+
: configPaths
43+
.map((path) => relative(process.cwd(), path))
44+
.map((path) => ` --config ${path}`)
45+
.join('');
3946

4047
return (
4148
'\n\n' +
4249
dedent`
4350
Elasticsearch and Kibana are ready for functional testing. Start the functional tests
4451
in another terminal session by running this command from this directory:
4552
46-
node ${relative(process.cwd(), KIBANA_FTR_SCRIPT)}${installDirFlag}
53+
node ${relative(process.cwd(), KIBANA_FTR_SCRIPT)}${installDirFlag}${pathsMessage}
4754
` +
4855
'\n\n'
4956
);

0 commit comments

Comments
 (0)