From 11a73f7c07c9d16b72caa50f449ae8ef3758aecb Mon Sep 17 00:00:00 2001 From: Devin Hurley Date: Tue, 12 Jan 2021 14:59:08 -0500 Subject: [PATCH] fix open-close signals integration test --- .../security_and_spaces/tests/open_close_signals.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/open_close_signals.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/open_close_signals.ts index ee787f1b616e3..1497b67011fe9 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/open_close_signals.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/open_close_signals.ts @@ -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); @@ -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 @@ -199,7 +199,7 @@ export default ({ getService }: FtrProviderContext) => { _source: { signal: { status }, }, - }) => status === 'open' + }) => status === 'closed' ); expect(everySignalOpen).to.eql(true); });