From 7cb80e9c251d9357659770c964fe53e1c3717c18 Mon Sep 17 00:00:00 2001 From: Jonathan Buttner Date: Mon, 21 Sep 2020 11:00:54 -0400 Subject: [PATCH] Removing test for same package upgraded multiple times --- .../apis/epm/bulk_upgrade.ts | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/x-pack/test/ingest_manager_api_integration/apis/epm/bulk_upgrade.ts b/x-pack/test/ingest_manager_api_integration/apis/epm/bulk_upgrade.ts index d2e669e587a4e..e377ea5a762f9 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/epm/bulk_upgrade.ts +++ b/x-pack/test/ingest_manager_api_integration/apis/epm/bulk_upgrade.ts @@ -56,38 +56,38 @@ export default function (providerContext: FtrProviderContext) { expect(entry.oldVersion).equal('0.1.0'); expect(entry.newVersion).equal('0.3.0'); }); - it('should handle the same package multiple times for upgrade', async function () { + it('should return an error for packages that do not exist', async function () { const { body }: { body: BulkInstallPackagesResponse } = await supertest .post(`/api/ingest_manager/epm/packages/_bulk`) .set('kbn-xsrf', 'xxxx') - .send({ packages: ['multiple_versions', 'multiple_versions'] }) + .send({ packages: ['multiple_versions', 'blahblah'] }) .expect(200); expect(body.response.length).equal(2); expect(body.response[0].name).equal('multiple_versions'); - let entry = body.response[0] as BulkInstallPackageInfo; + const entry = body.response[0] as BulkInstallPackageInfo; expect(entry.oldVersion).equal('0.1.0'); expect(entry.newVersion).equal('0.3.0'); - entry = body.response[1] as BulkInstallPackageInfo; - expect(entry.oldVersion).equal('0.3.0'); - expect(entry.newVersion).equal('0.3.0'); - expect(body.response[1].name).equal('multiple_versions'); + const err = body.response[1] as IBulkInstallPackageError; + expect(err.statusCode).equal(404); + expect(body.response[1].name).equal('blahblah'); }); - it('should return an error for packages that do not exist', async function () { + it('should upgrade multiple packages', async function () { const { body }: { body: BulkInstallPackagesResponse } = await supertest .post(`/api/ingest_manager/epm/packages/_bulk`) .set('kbn-xsrf', 'xxxx') - .send({ packages: ['multiple_versions', 'blahblah'] }) + .send({ packages: ['multiple_versions', 'overrides'] }) .expect(200); expect(body.response.length).equal(2); expect(body.response[0].name).equal('multiple_versions'); - const entry = body.response[0] as BulkInstallPackageInfo; + let entry = body.response[0] as BulkInstallPackageInfo; expect(entry.oldVersion).equal('0.1.0'); expect(entry.newVersion).equal('0.3.0'); - const err = body.response[1] as IBulkInstallPackageError; - expect(err.statusCode).equal(404); - expect(body.response[1].name).equal('blahblah'); + entry = body.response[1] as BulkInstallPackageInfo; + expect(entry.oldVersion).equal(null); + expect(entry.newVersion).equal('0.1.0'); + expect(entry.name).equal('overrides'); }); });