Skip to content

Commit 6dff233

Browse files
committed
removed assertions for updatedAt in non-update operations
1 parent cf24b03 commit 6dff233

6 files changed

Lines changed: 1 addition & 13 deletions

File tree

x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/create.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ export default function createAlertTests({ getService }: FtrProviderContext) {
103103
expect(typeof response.body.scheduledTaskId).to.be('string');
104104
expect(Date.parse(response.body.createdAt)).to.be.greaterThan(0);
105105
expect(Date.parse(response.body.updatedAt)).to.be.greaterThan(0);
106-
expect(Date.parse(response.body.updatedAt)).to.be.greaterThan(
107-
Date.parse(response.body.createdAt)
108-
);
106+
109107
const { _source: taskRecord } = await getScheduledTask(response.body.scheduledTaskId);
110108
expect(taskRecord.type).to.eql('task');
111109
expect(taskRecord.task.taskType).to.eql('alerting:test.noop');

x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/find.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export default function createFindTests({ getService }: FtrProviderContext) {
7676
});
7777
expect(Date.parse(match.createdAt)).to.be.greaterThan(0);
7878
expect(Date.parse(match.updatedAt)).to.be.greaterThan(0);
79-
expect(Date.parse(match.updatedAt)).to.be.greaterThan(Date.parse(match.createdAt));
8079
break;
8180
default:
8281
throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`);
@@ -167,7 +166,6 @@ export default function createFindTests({ getService }: FtrProviderContext) {
167166
});
168167
expect(Date.parse(match.createdAt)).to.be.greaterThan(0);
169168
expect(Date.parse(match.updatedAt)).to.be.greaterThan(0);
170-
expect(Date.parse(match.updatedAt)).to.be.greaterThan(Date.parse(match.createdAt));
171169
break;
172170
default:
173171
throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`);

x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/get.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ export default function createGetTests({ getService }: FtrProviderContext) {
7070
});
7171
expect(Date.parse(response.body.createdAt)).to.be.greaterThan(0);
7272
expect(Date.parse(response.body.updatedAt)).to.be.greaterThan(0);
73-
expect(Date.parse(response.body.updatedAt)).to.be.greaterThan(
74-
Date.parse(response.body.createdAt)
75-
);
7673
break;
7774
default:
7875
throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`);

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/create.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ export default function createAlertTests({ getService }: FtrProviderContext) {
8484
});
8585
expect(Date.parse(response.body.createdAt)).to.be.greaterThan(0);
8686
expect(Date.parse(response.body.updatedAt)).to.be.greaterThan(0);
87-
expect(Date.parse(response.body.updatedAt)).to.eql(Date.parse(response.body.createdAt));
8887

8988
expect(typeof response.body.scheduledTaskId).to.be('string');
9089
const { _source: taskRecord } = await getScheduledTask(response.body.scheduledTaskId);

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/find.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export default function createFindTests({ getService }: FtrProviderContext) {
5959
});
6060
expect(Date.parse(match.createdAt)).to.be.greaterThan(0);
6161
expect(Date.parse(match.updatedAt)).to.be.greaterThan(0);
62-
expect(Date.parse(match.updatedAt)).to.be.greaterThan(Date.parse(match.createdAt));
6362
});
6463

6564
it(`shouldn't find alert from another space`, async () => {

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/get.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ export default function createGetTests({ getService }: FtrProviderContext) {
5353
});
5454
expect(Date.parse(response.body.createdAt)).to.be.greaterThan(0);
5555
expect(Date.parse(response.body.updatedAt)).to.be.greaterThan(0);
56-
expect(Date.parse(response.body.updatedAt)).to.be.greaterThan(
57-
Date.parse(response.body.createdAt)
58-
);
5956
});
6057

6158
it(`shouldn't find alert from another space`, async () => {

0 commit comments

Comments
 (0)