[ftr] prevent configs from using --oss flag (#136756)

This commit is contained in:
Spencer 2022-07-20 12:20:58 -07:00 committed by GitHub
parent a6f6122585
commit b9436617f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -112,6 +112,10 @@ export function parseRawFlags(rawFlags: string[]) {
}
}
if (cliArgs.has('oss')) {
throw new Error(`--oss is not a valid flag to pass in FTR config files`);
}
return [...cliArgs.entries()]
.sort(([a], [b]) => {
const aDot = a.includes('.');

View file

@ -78,9 +78,7 @@ export async function runKibanaServer({
const kbnFlags = parseRawFlags([
// When installDir is passed, we run from a built version of Kibana which uses different command line
// arguments. If installDir is not passed, we run from source code.
...(installDir
? [...buildArgs, ...serverArgs.filter((a: string) => a !== '--oss')]
: [...sourceArgs, ...serverArgs]),
...(installDir ? [...buildArgs, ...serverArgs] : [...sourceArgs, ...serverArgs]),
// We also allow passing in extra Kibana server options, tack those on here so they always take precedence
...(options.extraKbnOpts ?? []),

View file

@ -22,7 +22,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...commonConfig.get('kbnTestServer'),
serverArgs: [
...commonConfig.get('kbnTestServer.serverArgs'),
'--oss',
'--telemetry.optIn=false',
'--dashboard.allowByValueEmbeddables=true',
],