Skip to content

Commit

Permalink
Fix jest tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeelmers committed Apr 15, 2021
1 parent 78e631a commit 7133d50
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,13 @@ describe('UsageCountersService', () => {
await tick();
// number of incrementCounter calls + number of retries
expect(mockIncrementCounter).toBeCalledTimes(2 + 1);
expect(logger.debug).toHaveBeenNthCalledWith(1, 'Store counters into savedObjects', [
mockError,
'pass',
]);
expect(logger.debug).toHaveBeenNthCalledWith(1, 'Store counters into savedObjects', {
kibana: {
usageCounters: {
results: [mockError, 'pass'],
},
},
});
});

it('buffers counters within `bufferDurationMs` time', async () => {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/security/server/audit/audit_events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { EcsEventOutcome, EcsEventType, KibanaRequest, LogMeta } from 'src/
import type { AuthenticationResult } from '../authentication/authentication_result';

/**
* Audit event schema using ECS format: https://www.elastic.co/guide/en/ecs/1.6/index.html
* Audit event schema using ECS format: https://www.elastic.co/guide/en/ecs/1.9/index.html
*
* If you add additional fields to the schema ensure you update the Kibana Filebeat module:
* https://github.com/elastic/beats/tree/master/filebeat/module/kibana
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/security/server/audit/audit_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ describe('#asScoped', () => {
expect(logger.info).toHaveBeenCalledWith('MESSAGE', {
event: { action: 'ACTION' },
kibana: { space_id: 'default', session_id: 'SESSION_ID' },
message: 'MESSAGE',
trace: { id: 'REQUEST_ID' },
user: { name: 'jdoe', roles: ['admin'] },
});
Expand Down

0 comments on commit 7133d50

Please sign in to comment.