Skip to content

Commit

Permalink
Fixing more failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
doakalexi committed Mar 29, 2023
1 parent 51ab067 commit cb99553
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 10 additions & 0 deletions x-pack/plugins/alerting/server/rules_client/tests/create.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ describe('create()', () => {
],
"alertTypeId": "123",
"apiKey": null,
"apiKeyCreatedByUser": null,
"apiKeyOwner": null,
"consumer": "bar",
"createdAt": "2019-02-12T21:01:22.479Z",
Expand Down Expand Up @@ -639,6 +640,7 @@ describe('create()', () => {
],
"alertTypeId": "123",
"apiKey": null,
"apiKeyCreatedByUser": null,
"apiKeyOwner": null,
"consumer": "bar",
"createdAt": "2019-02-12T21:01:22.479Z",
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -2086,6 +2094,7 @@ describe('create()', () => {
],
apiKeyOwner: null,
apiKey: null,
apiKeyCreatedByUser: null,
legacyId: null,
createdBy: 'elastic',
updatedBy: 'elastic',
Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down

0 comments on commit cb99553

Please sign in to comment.