Skip to content

Commit

Permalink
[Fleet] Fix flaky package install version integration test (#138034)
Browse files Browse the repository at this point in the history
(cherry picked from commit 319cba3)
  • Loading branch information
nchaulet committed Aug 3, 2022
1 parent a909f16 commit 1634cfa
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const fakeRequest = {
},
} as unknown as KibanaRequest;

const PACKAGES = ['fleet_server', 'system', 'nginx', 'apache'];

describe('Uprade package install version', () => {
let esServer: kbnTestServer.TestElasticsearchUtils;
let kbnServer: kbnTestServer.TestKibanaUtils;
Expand Down Expand Up @@ -183,6 +185,10 @@ describe('Uprade package install version', () => {

res.saved_objects.forEach((so) => {
expect(so.attributes.install_format_schema_version).toBe(FLEET_INSTALL_FORMAT_VERSION);
if (!PACKAGES.includes(so.attributes.name)) {
return;
}

if (!OUTDATED_PACKAGES.includes(so.attributes.name)) {
expect(new Date(so.updated_at as string).getTime()).toBeLessThan(now);
} else {
Expand Down

0 comments on commit 1634cfa

Please sign in to comment.