Fix audit log tests (#111706)
This ensures that the config object given to the `AuditService` setup method is in fact the `xpack.security.audit.*` config options. Previously the entire `xpack.security.*` config object would be passed in. The reason why this didn't fail the tests before was that both happen to have a similarly named config option called `enabled`, which these tests rely on.
This commit is contained in:
parent
b001830d58
commit
29142a6fb8
|
@ -29,7 +29,7 @@ import {
|
|||
jest.useFakeTimers();
|
||||
|
||||
const createConfig = (settings: Partial<ConfigType['audit']>) => {
|
||||
return ConfigSchema.validate(settings);
|
||||
return ConfigSchema.validate({ audit: settings }).audit;
|
||||
};
|
||||
|
||||
const logger = loggingSystemMock.createLogger();
|
||||
|
|
Loading…
Reference in a new issue