Skip to content

Commit

Permalink
Updated PR from feedback and merge from master
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankHassanabad committed Nov 21, 2019
1 parent acd752a commit f109cfe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions x-pack/legacy/plugins/siem/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ describe('siem plugin tests', () => {
]);
});

test('alertingFeatureEnabled being true and an empty string for siemIndex returns regular kibana and elasticsearch plugins', () => {
expect(getRequiredPlugins(undefined, '')).toEqual(['kibana', 'elasticsearch']);
});

test('alertingFeatureEnabled being true and a string of spaces for siemIndex returns regular kibana and elasticsearch plugins', () => {
expect(getRequiredPlugins(undefined, ' ')).toEqual(['kibana', 'elasticsearch']);
});

test('alertingFeatureEnabled being null and a string for siemIndex returns alerting and actions', () => {
expect(getRequiredPlugins(null, '.siem-signals-frank')).toEqual([
'kibana',
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/siem/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const getRequiredPlugins = (
) => {
const baseRequire = ['kibana', 'elasticsearch'];
if (
signalsIndex != null ||
(signalsIndex != null && signalsIndex.trim() !== '') ||
(alertingFeatureEnabled && alertingFeatureEnabled.toLowerCase() === 'true')
) {
return [...baseRequire, 'alerting', 'actions'];
Expand Down

0 comments on commit f109cfe

Please sign in to comment.