Skip to content

Commit

Permalink
fix open-close signals integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
dhurley14 committed Jan 12, 2021
1 parent a4000f4 commit 11a73f7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default ({ getService }: FtrProviderContext) => {
expect(everySignalClosed).to.eql(true);
});

it('should NOT be able to close signals with t1 analyst user', async () => {
it('should be able to close signals with t1 analyst user', async () => {
const rule = getRuleForSignalTesting(['auditbeat-*']);
const { id } = await createRule(supertest, rule);
await waitForRuleSuccessOrStatus(supertest, id);
Expand All @@ -182,7 +182,7 @@ export default ({ getService }: FtrProviderContext) => {
.set('kbn-xsrf', 'true')
.auth(ROLES.t1_analyst, 'changeme')
.send(setSignalStatus({ signalIds, status: 'closed' }))
.expect(403);
.expect(200);

// query for the signals with the superuser
// to allow a check that the signals were NOT closed with t1 analyst
Expand All @@ -199,7 +199,7 @@ export default ({ getService }: FtrProviderContext) => {
_source: {
signal: { status },
},
}) => status === 'open'
}) => status === 'closed'
);
expect(everySignalOpen).to.eql(true);
});
Expand Down

0 comments on commit 11a73f7

Please sign in to comment.