Skip to content

Commit

Permalink
server logs config paths to use for runner (#52980) (#80933)
Browse files Browse the repository at this point in the history
* 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 <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
  • Loading branch information
3 people committed Oct 17, 2020
1 parent f102e07 commit a4d5551
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export function displayHelp() {
export function processOptions(userOptions, defaultConfigPath) {
validateOptions(userOptions);

const config = userOptions.config || defaultConfigPath;
const useDefaultConfig = !userOptions.config;
const config = useDefaultConfig ? defaultConfigPath : userOptions.config;

if (!config) {
throw new Error(`functional_tests_server: config is required`);
Expand All @@ -100,6 +101,7 @@ export function processOptions(userOptions, defaultConfigPath) {
return {
...userOptions,
config: resolve(config),
useDefaultConfig,
createLogger,
extraKbnOpts: userOptions._,
};
Expand Down
9 changes: 8 additions & 1 deletion packages/kbn-test/src/functional_tests/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,21 @@ import { readConfigFile } from '../functional_test_runner/lib';

const makeSuccessMessage = (options) => {
const installDirFlag = options.installDir ? ` --kibana-install-dir=${options.installDir}` : '';
const configPaths = Array.isArray(options.config) ? options.config : [options.config];
const pathsMessage = options.useDefaultConfig
? ''
: configPaths
.map((path) => relative(process.cwd(), path))
.map((path) => ` --config ${path}`)
.join('');

return (
'\n\n' +
dedent`
Elasticsearch and Kibana are ready for functional testing. Start the functional tests
in another terminal session by running this command from this directory:
node ${relative(process.cwd(), KIBANA_FTR_SCRIPT)}${installDirFlag}
node ${relative(process.cwd(), KIBANA_FTR_SCRIPT)}${installDirFlag}${pathsMessage}
` +
'\n\n'
);
Expand Down

0 comments on commit a4d5551

Please sign in to comment.