-
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.
Make
core
responsible for reading and merging of config files. Simp…
…lify legacy config adapter.
- Loading branch information
Showing
31 changed files
with
656 additions
and
716 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
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,7 @@ | ||
foo: 1 | ||
bar: true | ||
xyz: ['1', '2'] | ||
abc: | ||
def: test | ||
qwe: 1 | ||
pom.bom: 3 |
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,7 @@ | ||
foo: 2 | ||
baz: bonkers | ||
xyz: ['3', '4'] | ||
abc: | ||
ghi: test2 | ||
qwe: 2 | ||
pom.mob: 4 |
73 changes: 73 additions & 0 deletions
73
src/core/server/config/__tests__/__snapshots__/read_config.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,73 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`different cwd() resolves relative files based on the cwd 1`] = ` | ||
Object { | ||
"abc": Object { | ||
"def": "test", | ||
"qwe": 1, | ||
}, | ||
"bar": true, | ||
"foo": 1, | ||
"pom": Object { | ||
"bom": 3, | ||
}, | ||
"xyz": Array [ | ||
"1", | ||
"2", | ||
], | ||
} | ||
`; | ||
|
||
exports[`reads and merges multiple yaml files from file system and parses to json 1`] = ` | ||
Object { | ||
"abc": Object { | ||
"def": "test", | ||
"ghi": "test2", | ||
"qwe": 2, | ||
}, | ||
"bar": true, | ||
"baz": "bonkers", | ||
"foo": 2, | ||
"pom": Object { | ||
"bom": 3, | ||
"mob": 4, | ||
}, | ||
"xyz": Array [ | ||
"3", | ||
"4", | ||
], | ||
} | ||
`; | ||
|
||
exports[`reads single yaml from file system and parses to json 1`] = ` | ||
Object { | ||
"pid": Object { | ||
"enabled": true, | ||
"file": "/var/run/kibana.pid", | ||
}, | ||
} | ||
`; | ||
|
||
exports[`returns a deep object 1`] = ` | ||
Object { | ||
"pid": Object { | ||
"enabled": true, | ||
"file": "/var/run/kibana.pid", | ||
}, | ||
} | ||
`; | ||
|
||
exports[`should inject an environment variable value when setting a value with \${ENV_VAR} 1`] = ` | ||
Object { | ||
"bar": "pre-val1-mid-val2-post", | ||
"elasticsearch": Object { | ||
"requestHeadersWhitelist": Array [ | ||
"val1", | ||
"val2", | ||
], | ||
}, | ||
"foo": 1, | ||
} | ||
`; | ||
|
||
exports[`should throw an exception when referenced environment variable in a config value does not exist 1`] = `"Unknown environment variable referenced in config : KBN_ENV_VAR1"`; |
Oops, something went wrong.