Skip to content

Commit

Permalink
update worker to load x-pack properly for serverless
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Jun 6, 2024
1 parent b14831b commit dc3de51
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions packages/kbn-capture-oas-snapshot-cli/src/kibana_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,27 @@ export type Result = 'ready';
};
set(settings, PLUGIN_SYSTEM_ENABLE_ALL_PLUGINS_CONFIG_PATH, true);

const cliArgs = {
serverless,
basePath: false,
cache: false,
dev: true,
disableOptimizer: true,
silent: false,
dist: false,
oss: false,
runExamples: false,
watch: false,
};

if (serverless) {
// Satisfy spaces config for serverless:
set(settings, 'xpack.spaces.allowFeatureVisibility', false);
const { startKibana } = createTestServerlessInstances({
kibana: { settings },
kibana: { settings, cliArgs },
});
await startKibana();
const {} = await startKibana();
} else {
const cliArgs = {
serverless,
basePath: false,
cache: false,
dev: true,
disableOptimizer: true,
silent: false,
dist: false,
oss: false,
runExamples: false,
watch: false,
};
const root = createRootWithCorePlugins(settings, cliArgs);
await root.preboot();
await root.setup();
Expand Down

0 comments on commit dc3de51

Please sign in to comment.