-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revamp core environment class to support upcoming core<-->legacy boot…
…strap inversion. (#21885)
- Loading branch information
Showing
16 changed files
with
479 additions
and
473 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
149 changes: 149 additions & 0 deletions
149
src/core/server/config/__tests__/__snapshots__/env.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`correctly creates default environment in dev mode.: env properties 1`] = ` | ||
Env { | ||
"binDir": "/test/cwd/bin", | ||
"cliArgs": Object { | ||
"dev": true, | ||
"someArg": 1, | ||
"someOtherArg": "2", | ||
}, | ||
"configDir": "/test/cwd/config", | ||
"configs": Array [ | ||
"/test/cwd/config/kibana.yml", | ||
], | ||
"corePluginsDir": "/test/cwd/core_plugins", | ||
"homeDir": "/test/cwd", | ||
"isDevClusterMaster": true, | ||
"legacy": EventEmitter { | ||
"_events": Object {}, | ||
"_eventsCount": 0, | ||
"_maxListeners": undefined, | ||
"domain": null, | ||
}, | ||
"logDir": "/test/cwd/log", | ||
"mode": Object { | ||
"dev": true, | ||
"name": "development", | ||
"prod": false, | ||
}, | ||
"packageInfo": Object { | ||
"branch": "some-branch", | ||
"buildNum": 9007199254740991, | ||
"buildSha": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", | ||
"version": "some-version", | ||
}, | ||
"staticFilesDir": "/test/cwd/ui", | ||
} | ||
`; | ||
|
||
exports[`correctly creates default environment in prod distributable mode.: env properties 1`] = ` | ||
Env { | ||
"binDir": "/test/cwd/bin", | ||
"cliArgs": Object { | ||
"dev": false, | ||
"someArg": 1, | ||
"someOtherArg": "2", | ||
}, | ||
"configDir": "/test/cwd/config", | ||
"configs": Array [ | ||
"/some/other/path/some-kibana.yml", | ||
], | ||
"corePluginsDir": "/test/cwd/core_plugins", | ||
"homeDir": "/test/cwd", | ||
"isDevClusterMaster": false, | ||
"legacy": EventEmitter { | ||
"_events": Object {}, | ||
"_eventsCount": 0, | ||
"_maxListeners": undefined, | ||
"domain": null, | ||
}, | ||
"logDir": "/test/cwd/log", | ||
"mode": Object { | ||
"dev": false, | ||
"name": "production", | ||
"prod": true, | ||
}, | ||
"packageInfo": Object { | ||
"branch": "feature-v1", | ||
"buildNum": 100, | ||
"buildSha": "feature-v1-build-sha", | ||
"version": "v1", | ||
}, | ||
"staticFilesDir": "/test/cwd/ui", | ||
} | ||
`; | ||
|
||
exports[`correctly creates default environment in prod non-distributable mode.: env properties 1`] = ` | ||
Env { | ||
"binDir": "/test/cwd/bin", | ||
"cliArgs": Object { | ||
"dev": false, | ||
"someArg": 1, | ||
"someOtherArg": "2", | ||
}, | ||
"configDir": "/test/cwd/config", | ||
"configs": Array [ | ||
"/some/other/path/some-kibana.yml", | ||
], | ||
"corePluginsDir": "/test/cwd/core_plugins", | ||
"homeDir": "/test/cwd", | ||
"isDevClusterMaster": false, | ||
"legacy": EventEmitter { | ||
"_events": Object {}, | ||
"_eventsCount": 0, | ||
"_maxListeners": undefined, | ||
"domain": null, | ||
}, | ||
"logDir": "/test/cwd/log", | ||
"mode": Object { | ||
"dev": false, | ||
"name": "production", | ||
"prod": true, | ||
}, | ||
"packageInfo": Object { | ||
"branch": "feature-v1", | ||
"buildNum": 9007199254740991, | ||
"buildSha": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", | ||
"version": "v1", | ||
}, | ||
"staticFilesDir": "/test/cwd/ui", | ||
} | ||
`; | ||
|
||
exports[`correctly creates environment with constructor.: env properties 1`] = ` | ||
Env { | ||
"binDir": "/some/home/dir/bin", | ||
"cliArgs": Object { | ||
"dev": false, | ||
"someArg": 1, | ||
"someOtherArg": "2", | ||
}, | ||
"configDir": "/some/home/dir/config", | ||
"configs": Array [ | ||
"/some/other/path/some-kibana.yml", | ||
], | ||
"corePluginsDir": "/some/home/dir/core_plugins", | ||
"homeDir": "/some/home/dir", | ||
"isDevClusterMaster": false, | ||
"legacy": EventEmitter { | ||
"_events": Object {}, | ||
"_eventsCount": 0, | ||
"_maxListeners": undefined, | ||
"domain": null, | ||
}, | ||
"logDir": "/some/home/dir/log", | ||
"mode": Object { | ||
"dev": false, | ||
"name": "production", | ||
"prod": true, | ||
}, | ||
"packageInfo": Object { | ||
"branch": "feature-v1", | ||
"buildNum": 100, | ||
"buildSha": "feature-v1-build-sha", | ||
"version": "v1", | ||
}, | ||
"staticFilesDir": "/some/home/dir/ui", | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.