Skip to content

Commit

Permalink
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
Browse files Browse the repository at this point in the history
…-ref HEAD~1..HEAD --fix'
  • Loading branch information
kibanamachine committed Sep 6, 2022
1 parent 619d6a3 commit ea3df40
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions x-pack/plugins/encrypted_saved_objects/server/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
* 2.0.
*/

import {coreMock, loggingSystemMock} from '@kbn/core/server/mocks';
import { coreMock, loggingSystemMock } from '@kbn/core/server/mocks';
import { securityMock } from '@kbn/security-plugin/server/mocks';

import { ConfigSchema } from './config';
import { EncryptedSavedObjectsPlugin } from './plugin';

describe('EncryptedSavedObjects Plugin', () => {

describe('setup()', () => {
it('exposes proper contract', () => {
const plugin = new EncryptedSavedObjectsPlugin(
Expand All @@ -30,8 +29,8 @@ describe('EncryptedSavedObjects Plugin', () => {

it('exposes proper contract when encryption key is set', () => {
const mockInitializerContext = coreMock.createPluginInitializerContext(
ConfigSchema.validate({encryptionKey: 'z'.repeat(32)}, {dist: true})
)
ConfigSchema.validate({ encryptionKey: 'z'.repeat(32) }, { dist: true })
);

const plugin = new EncryptedSavedObjectsPlugin(mockInitializerContext);

Expand All @@ -44,12 +43,12 @@ describe('EncryptedSavedObjects Plugin', () => {
}
`);

const infoLogs = loggingSystemMock.collect(mockInitializerContext.logger).info
const infoLogs = loggingSystemMock.collect(mockInitializerContext.logger).info;

expect(infoLogs.length).toBe(1);
expect(infoLogs[0]).toEqual(
[`Hashed 'encryptionKey' for this instance: WLbjNGKEm7aA4NfJHYyW88jHUkHtyF7ENHcF0obYGBU=`]
);
expect(infoLogs[0]).toEqual([
`Hashed 'encryptionKey' for this instance: WLbjNGKEm7aA4NfJHYyW88jHUkHtyF7ENHcF0obYGBU=`,
]);
});
});

Expand Down

0 comments on commit ea3df40

Please sign in to comment.