Skip to content

Commit

Permalink
[ML] API integration tests - fix sorting in saved object status test (#…
Browse files Browse the repository at this point in the history
…87800) (#87819)

This PR fixes the sorting of response body jobs in the saved object status test.
  • Loading branch information
pheyos authored Jan 11, 2021
1 parent 9a7d7de commit 968eb80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x-pack/test/api_integration/apis/ml/saved_objects/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default ({ getService }: FtrProviderContext) => {
expect(body).to.have.property('jobs');

expect(body.jobs).to.have.property('anomaly-detector');
expect(sortBy(body.jobs['anomaly-detector'], 'id')).to.eql([
expect(sortBy(body.jobs['anomaly-detector'], 'jobId')).to.eql([
{
checks: { savedObjectExits: true },
datafeedId: null,
Expand All @@ -92,7 +92,7 @@ export default ({ getService }: FtrProviderContext) => {
]);

expect(body.jobs).to.have.property('data-frame-analytics');
expect(sortBy(body.jobs['data-frame-analytics'], 'id')).to.eql([
expect(sortBy(body.jobs['data-frame-analytics'], 'jobId')).to.eql([
{
checks: { savedObjectExits: true },
datafeedId: null,
Expand All @@ -109,7 +109,7 @@ export default ({ getService }: FtrProviderContext) => {
expect(body).to.have.property('savedObjects');

expect(body.savedObjects).to.have.property('anomaly-detector');
expect(sortBy(body.savedObjects['anomaly-detector'], 'id')).to.eql([
expect(sortBy(body.savedObjects['anomaly-detector'], 'jobId')).to.eql([
{
checks: { datafeedExists: false, jobExists: true },
datafeedId: null,
Expand All @@ -127,7 +127,7 @@ export default ({ getService }: FtrProviderContext) => {
]);

expect(body.savedObjects).to.have.property('data-frame-analytics');
expect(sortBy(body.savedObjects['data-frame-analytics'], 'id')).to.eql([
expect(sortBy(body.savedObjects['data-frame-analytics'], 'jobId')).to.eql([
{
checks: { jobExists: true },
jobId: dfaJobIdSpace1,
Expand Down

0 comments on commit 968eb80

Please sign in to comment.