Skip to content

Commit

Permalink
Fix API integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
miltonhultgren committed Jun 3, 2022
1 parent 21a4c73 commit e8687dd
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,8 @@
"transport_address": "tsullivan.local:5601",
"uuid": "de3b8f2a-7bb9-4931-9bf3-997ba7824cf9",
"version": "7.0.0-alpha1",
"availability": false,
"lastSeenTimestamp": "2017-08-29T17:25:43.192Z",
"statusIsStale": true,
"os_memory_free": 1645989888,
"uptime": 200102
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"de3b8f2a-7bb9-4931-9bf3-997ba7824cf9"
],
"status": "green",
"some_status_is_stale": true,
"requests_total": 174,
"concurrent_connections": 174,
"response_time_max": 2203,
Expand Down Expand Up @@ -38,7 +39,7 @@
"uuid": "de3b8f2a-7bb9-4931-9bf3-997ba7824cf9",
"status": "green"
},
"availability": false
"statusIsStale": true
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"requests_total": 174,
"response_time_max": 2203,
"status": "green",
"some_status_is_stale": true,
"uuids": [
"de3b8f2a-7bb9-4931-9bf3-997ba7824cf9"
]
Expand Down
6 changes: 6 additions & 0 deletions x-pack/test/api_integration/apis/monitoring/kibana/listing.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ export default function ({ getService }) {
.send({ timeRange })
.expect(200);

// Fixture is shared between internal and Metricbeat collection tests
// But timestamps of documents differ by a few miliseconds
const lastSeenTimestamp = body.kibanas[0].lastSeenTimestamp;
delete body.kibanas[0].lastSeenTimestamp;

expect(body).to.eql(listingFixture);
expect(lastSeenTimestamp).to.eql('2017-08-29T17:25:47.825Z');
});
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ export default function ({ getService }) {
.send({ timeRange })
.expect(200);

// Fixture is shared between internal and Metricbeat collection tests
// But timestamps of documents differ by a few miliseconds
const lastSeenTimestamp = body.kibanas[0].lastSeenTimestamp;
delete body.kibanas[0].lastSeenTimestamp;

expect(body).to.eql(listingFixture);
expect(lastSeenTimestamp).to.eql('2017-08-29T17:25:43.192Z');
});
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
},
"kibana": {
"status": "green",
"some_status_is_stale": true,
"requests_total": 42,
"concurrent_connections": 0,
"response_time_max": 864,
Expand Down Expand Up @@ -148,6 +149,7 @@
},
"kibana": {
"status": null,
"some_status_is_stale": true,
"requests_total": 0,
"concurrent_connections": 0,
"response_time_max": 0,
Expand Down

0 comments on commit e8687dd

Please sign in to comment.