From 5ff0200ce5b3f64532c706b71b0f7d2387b981b1 Mon Sep 17 00:00:00 2001 From: Gidi Meir Morris Date: Tue, 7 Apr 2020 13:20:07 +0100 Subject: [PATCH] corrected stubs in tests --- x-pack/plugins/alerting/server/routes/health.test.ts | 12 ++++++------ .../sections/alert_form/alert_add.test.tsx | 5 ++++- .../sections/alert_form/alert_edit.test.tsx | 5 ++++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/alerting/server/routes/health.test.ts b/x-pack/plugins/alerting/server/routes/health.test.ts index 9df58656e89e1..42c83a7c04deb 100644 --- a/x-pack/plugins/alerting/server/routes/health.test.ts +++ b/x-pack/plugins/alerting/server/routes/health.test.ts @@ -80,7 +80,7 @@ describe('healthRoute', () => { expect(await handler(context, req, res)).toMatchInlineSnapshot(` Object { "body": Object { - "isESOUsingEphemeralEncryptionKey": true, + "hasPermanentEncryptionKey": false, "isSufficientlySecure": true, }, } @@ -104,7 +104,7 @@ describe('healthRoute', () => { expect(await handler(context, req, res)).toMatchInlineSnapshot(` Object { "body": Object { - "isESOUsingEphemeralEncryptionKey": false, + "hasPermanentEncryptionKey": true, "isSufficientlySecure": true, }, } @@ -128,7 +128,7 @@ describe('healthRoute', () => { expect(await handler(context, req, res)).toMatchInlineSnapshot(` Object { "body": Object { - "isESOUsingEphemeralEncryptionKey": false, + "hasPermanentEncryptionKey": true, "isSufficientlySecure": true, }, } @@ -154,7 +154,7 @@ describe('healthRoute', () => { expect(await handler(context, req, res)).toMatchInlineSnapshot(` Object { "body": Object { - "isESOUsingEphemeralEncryptionKey": false, + "hasPermanentEncryptionKey": true, "isSufficientlySecure": false, }, } @@ -180,7 +180,7 @@ describe('healthRoute', () => { expect(await handler(context, req, res)).toMatchInlineSnapshot(` Object { "body": Object { - "isESOUsingEphemeralEncryptionKey": false, + "hasPermanentEncryptionKey": true, "isSufficientlySecure": false, }, } @@ -206,7 +206,7 @@ describe('healthRoute', () => { expect(await handler(context, req, res)).toMatchInlineSnapshot(` Object { "body": Object { - "isESOUsingEphemeralEncryptionKey": false, + "hasPermanentEncryptionKey": true, "isSufficientlySecure": true, }, } diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.test.tsx index ff83737325e8b..c1f8b0e383171 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.test.tsx @@ -53,7 +53,10 @@ describe('alert_add', () => { docLinks: { ELASTIC_WEBSITE_URL: '', DOC_LINK_VERSION: '' }, }; - mockes.http.get.mockResolvedValue({ isSufficientlySecure: true }); + mockes.http.get.mockResolvedValue({ + isSufficientlySecure: true, + hasPermanentEncryptionKey: true, + }); const alertType = { id: 'my-alert-type', diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_edit.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_edit.test.tsx index 6fcfb463c4c77..916ba368e0732 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_edit.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_edit.test.tsx @@ -36,7 +36,10 @@ describe('alert_edit', () => { docLinks: { ELASTIC_WEBSITE_URL: '', DOC_LINK_VERSION: '' }, }; - mockedCoreSetup.http.get.mockResolvedValue({ isSufficientlySecure: true }); + mockedCoreSetup.http.get.mockResolvedValue({ + isSufficientlySecure: true, + hasPermanentEncryptionKey: true, + }); const alertType = { id: 'my-alert-type',