-
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.
Merge branch '8.8' into backport/8.8/pr-155519
- Loading branch information
Showing
291 changed files
with
16,668 additions
and
3,214 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
[ | ||
"x-pack/plugins/watcher/jest.config.js", | ||
"src/core/server/integration_tests/ui_settings/jest.integration.config.js" | ||
"x-pack/plugins/watcher/jest.config.js" | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
uiSettings.overrides.defaultRoute: /app/observability/overview | ||
xpack.infra.logs.app_target: discover |
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
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 |
---|---|---|
|
@@ -52,6 +52,6 @@ | |
}, | ||
{ | ||
"name": "security_detection_engine", | ||
"version": "8.7.2" | ||
"version": "8.8.1" | ||
} | ||
] |
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
25 changes: 25 additions & 0 deletions
25
packages/core/root/core-root-server-internal/src/bootstrap.test.mocks.ts
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,25 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { Env } from '@kbn/config'; | ||
import { rawConfigServiceMock, configServiceMock } from '@kbn/config-mocks'; | ||
|
||
export const mockConfigService = configServiceMock.create(); | ||
export const mockRawConfigService = rawConfigServiceMock.create(); | ||
export const mockRawConfigServiceConstructor = jest.fn(() => mockRawConfigService); | ||
jest.doMock('@kbn/config', () => ({ | ||
ConfigService: jest.fn(() => mockConfigService), | ||
Env, | ||
RawConfigService: jest.fn(mockRawConfigServiceConstructor), | ||
})); | ||
|
||
jest.doMock('./root', () => ({ | ||
Root: jest.fn(() => ({ | ||
shutdown: jest.fn(), | ||
})), | ||
})); |
61 changes: 61 additions & 0 deletions
61
packages/core/root/core-root-server-internal/src/bootstrap.test.ts
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,61 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { of } from 'rxjs'; | ||
import type { CliArgs } from '@kbn/config'; | ||
|
||
import { mockRawConfigService, mockRawConfigServiceConstructor } from './bootstrap.test.mocks'; | ||
|
||
jest.mock('@kbn/core-logging-server-internal'); | ||
|
||
import { bootstrap } from './bootstrap'; | ||
|
||
const bootstrapCfg = { | ||
configs: ['config/kibana.yml'], | ||
cliArgs: {} as unknown as CliArgs, | ||
applyConfigOverrides: () => ({}), | ||
}; | ||
|
||
describe('bootstrap', () => { | ||
describe('serverless', () => { | ||
beforeEach(() => { | ||
jest.clearAllMocks(); | ||
}); | ||
|
||
test('should load additional serverless files for a valid project', async () => { | ||
mockRawConfigService.getConfig$.mockReturnValue(of({ serverless: 'es' })); | ||
await bootstrap(bootstrapCfg); | ||
expect(mockRawConfigServiceConstructor).toHaveBeenCalledTimes(2); | ||
expect(mockRawConfigServiceConstructor).toHaveBeenNthCalledWith( | ||
1, | ||
bootstrapCfg.configs, | ||
bootstrapCfg.applyConfigOverrides | ||
); | ||
expect(mockRawConfigServiceConstructor).toHaveBeenNthCalledWith( | ||
2, | ||
[ | ||
expect.stringContaining('config/serverless.yml'), | ||
expect.stringContaining('config/serverless.es.yml'), | ||
...bootstrapCfg.configs, | ||
], | ||
bootstrapCfg.applyConfigOverrides | ||
); | ||
}); | ||
|
||
test('should skip loading the serverless files for an invalid project', async () => { | ||
mockRawConfigService.getConfig$.mockReturnValue(of({ serverless: 'not-valid' })); | ||
await bootstrap(bootstrapCfg); | ||
expect(mockRawConfigServiceConstructor).toHaveBeenCalledTimes(1); | ||
expect(mockRawConfigServiceConstructor).toHaveBeenNthCalledWith( | ||
1, | ||
bootstrapCfg.configs, | ||
bootstrapCfg.applyConfigOverrides | ||
); | ||
}); | ||
}); | ||
}); |
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.