[7.x] [kbn/es] use an ES_TMPDIR that is within the install pat… (#47964)
* [kbn/es] use an ES_TMPDIR that is within the install path * support tests which don't pass installPath
This commit is contained in:
parent
a133b5fb13
commit
d504a82954
|
@ -278,6 +278,7 @@ exports.Cluster = class Cluster {
|
||||||
this._process = execa(ES_BIN, args, {
|
this._process = execa(ES_BIN, args, {
|
||||||
cwd: installPath,
|
cwd: installPath,
|
||||||
env: {
|
env: {
|
||||||
|
...(installPath ? { ES_TMPDIR: path.resolve(installPath, 'ES_TMPDIR') } : {}),
|
||||||
...process.env,
|
...process.env,
|
||||||
...(options.bundledJDK ? { JAVA_HOME: '' } : {}),
|
...(options.bundledJDK ? { JAVA_HOME: '' } : {}),
|
||||||
...(options.esEnvVars || {}),
|
...(options.esEnvVars || {}),
|
||||||
|
|
|
@ -65,6 +65,10 @@ exports.installArchive = async function installArchive(archive, options = {}) {
|
||||||
await decompress(dest, installPath);
|
await decompress(dest, installPath);
|
||||||
log.info('extracted to %s', chalk.bold(installPath));
|
log.info('extracted to %s', chalk.bold(installPath));
|
||||||
|
|
||||||
|
const tmpdir = path.resolve(installPath, 'ES_TMPDIR');
|
||||||
|
fs.mkdirSync(tmpdir, { recursive: true });
|
||||||
|
log.info('created %s', chalk.bold(tmpdir));
|
||||||
|
|
||||||
if (license !== 'oss') {
|
if (license !== 'oss') {
|
||||||
// starting in 6.3, security is disabled by default. Since we bootstrap
|
// starting in 6.3, security is disabled by default. Since we bootstrap
|
||||||
// the keystore, we can enable security ourselves.
|
// the keystore, we can enable security ourselves.
|
||||||
|
|
Loading…
Reference in a new issue