diff --git a/x-pack/plugins/alerting/server/rules_client/tests/bulk_edit.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/bulk_edit.test.ts index 658f5c9e128c4..8d0d587e9e456 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/bulk_edit.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/bulk_edit.test.ts @@ -586,7 +586,7 @@ describe('bulkEdit()', () => { ], apiKey: null, apiKeyOwner: null, - apiKeyCreatedByUser: false, + apiKeyCreatedByUser: null, meta: { versionApiKeyLastmodified: 'v8.2.0' }, name: 'my rule name', enabled: false, diff --git a/x-pack/plugins/alerting/server/rules_client/tests/create.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/create.test.ts index 3467c9bc6782c..d5ad449147393 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/create.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/create.test.ts @@ -418,6 +418,7 @@ describe('create()', () => { ], "alertTypeId": "123", "apiKey": null, + "apiKeyCreatedByUser": null, "apiKeyOwner": null, "consumer": "bar", "createdAt": "2019-02-12T21:01:22.479Z", @@ -639,6 +640,7 @@ describe('create()', () => { ], "alertTypeId": "123", "apiKey": null, + "apiKeyCreatedByUser": null, "apiKeyOwner": null, "consumer": "bar", "createdAt": "2019-02-12T21:01:22.479Z", @@ -1090,6 +1092,7 @@ describe('create()', () => { alertTypeId: '123', apiKey: null, apiKeyOwner: null, + apiKeyCreatedByUser: null, consumer: 'bar', createdAt: '2019-02-12T21:01:22.479Z', createdBy: 'elastic', @@ -1300,6 +1303,7 @@ describe('create()', () => { alertTypeId: '123', apiKey: null, apiKeyOwner: null, + apiKeyCreatedByUser: null, consumer: 'bar', createdAt: '2019-02-12T21:01:22.479Z', createdBy: 'elastic', @@ -1480,6 +1484,7 @@ describe('create()', () => { alertTypeId: '123', apiKey: null, apiKeyOwner: null, + apiKeyCreatedByUser: null, legacyId: null, consumer: 'bar', createdAt: '2019-02-12T21:01:22.479Z', @@ -1653,6 +1658,7 @@ describe('create()', () => { params: { bar: true }, apiKey: null, apiKeyOwner: null, + apiKeyCreatedByUser: null, createdBy: 'elastic', createdAt: '2019-02-12T21:01:22.479Z', updatedBy: 'elastic', @@ -1790,6 +1796,7 @@ describe('create()', () => { params: { bar: true }, apiKey: null, apiKeyOwner: null, + apiKeyCreatedByUser: null, createdBy: 'elastic', createdAt: '2019-02-12T21:01:22.479Z', updatedBy: 'elastic', @@ -1927,6 +1934,7 @@ describe('create()', () => { params: { bar: true }, apiKey: null, apiKeyOwner: null, + apiKeyCreatedByUser: null, createdBy: 'elastic', createdAt: '2019-02-12T21:01:22.479Z', updatedBy: 'elastic', @@ -2086,6 +2094,7 @@ describe('create()', () => { ], apiKeyOwner: null, apiKey: null, + apiKeyCreatedByUser: null, legacyId: null, createdBy: 'elastic', updatedBy: 'elastic', @@ -2565,6 +2574,7 @@ describe('create()', () => { params: { bar: true }, apiKey: null, apiKeyOwner: null, + apiKeyCreatedByUser: null, createdBy: 'elastic', createdAt: '2019-02-12T21:01:22.479Z', updatedBy: 'elastic', diff --git a/x-pack/plugins/alerting/server/rules_client/tests/update_api_key.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/update_api_key.test.ts index fbf86ffcf4f8d..460b2b96df3b2 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/update_api_key.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/update_api_key.test.ts @@ -120,6 +120,7 @@ describe('updateApiKey()', () => { enabled: true, apiKey: Buffer.from('234:abc').toString('base64'), apiKeyOwner: 'elastic', + apiKeyCreatedByUser: false, revision: 0, updatedBy: 'elastic', updatedAt: '2019-02-12T21:01:22.479Z', @@ -175,6 +176,7 @@ describe('updateApiKey()', () => { enabled: true, apiKey: Buffer.from('234:abc').toString('base64'), apiKeyOwner: 'elastic', + apiKeyCreatedByUser: false, revision: 0, updatedBy: 'elastic', updatedAt: '2019-02-12T21:01:22.479Z', @@ -231,6 +233,7 @@ describe('updateApiKey()', () => { enabled: true, apiKey: Buffer.from('234:abc').toString('base64'), apiKeyOwner: 'elastic', + apiKeyCreatedByUser: false, revision: 0, updatedAt: '2019-02-12T21:01:22.479Z', updatedBy: 'elastic', diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/create.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/create.ts index 5ff6a1cf55175..5f2b892a416a3 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/create.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/create.ts @@ -123,6 +123,7 @@ export default function createAlertTests({ getService }: FtrProviderContext) { notify_when: 'onThrottleInterval', updated_by: user.username, api_key_owner: user.username, + api_key_created_by_user: false, mute_all: false, muted_alert_ids: [], execution_status: response.body.execution_status, diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_disable.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_disable.ts index 86f468534318e..13a89de8381ca 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_disable.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_disable.ts @@ -19,6 +19,7 @@ const getDefaultRules = (response: any) => ({ consumer: 'alertsFixture', throttle: '1m', alertTypeId: 'test.noop', + apiKeyCreatedByUser: false, apiKeyOwner: response.body.rules[0].apiKeyOwner, createdBy: 'elastic', updatedBy: response.body.rules[0].updatedBy, diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_enable.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_enable.ts index 7469773cc5705..3f1239558c5eb 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_enable.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_enable.ts @@ -83,6 +83,7 @@ export default ({ getService }: FtrProviderContext) => { consumer: 'alertsFixture', throttle: '1m', alertTypeId: 'test.noop', + apiKeyCreatedByUser: false, apiKeyOwner: response.body.rules[0].apiKeyOwner, createdBy: 'elastic', updatedBy: response.body.rules[0].updatedBy, diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/clone.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/clone.ts index d9fc773d5d12a..46aef808c0877 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/clone.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/clone.ts @@ -161,6 +161,7 @@ export default function createAlertTests({ getService }: FtrProviderContext) { throttle: '1m', notify_when: 'onThrottleInterval', updated_by: user.username, + api_key_created_by_user: false, api_key_owner: user.username, mute_all: false, muted_alert_ids: [],