From 2371ee56c1409087742d2c1cc87da9851425e198 Mon Sep 17 00:00:00 2001 From: Robert Oskamp Date: Thu, 26 Mar 2020 16:11:24 +0100 Subject: [PATCH] [ML] Functional API test - disable mml value check (#61446) This PR re-activates the model memory estimation endpoint test and disabled the response value check. --- .../apis/ml/calculate_model_memory_limit.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/x-pack/test/api_integration/apis/ml/calculate_model_memory_limit.ts b/x-pack/test/api_integration/apis/ml/calculate_model_memory_limit.ts index 61e1763cc9f75..7fb0a10d94a4b 100644 --- a/x-pack/test/api_integration/apis/ml/calculate_model_memory_limit.ts +++ b/x-pack/test/api_integration/apis/ml/calculate_model_memory_limit.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import expect from '@kbn/expect'; - import { FtrProviderContext } from '../../ftr_provider_context'; import { USER } from '../../../functional/services/machine_learning/security_common'; @@ -142,13 +140,12 @@ export default ({ getService }: FtrProviderContext) => { }, expected: { responseCode: 200, - responseBody: { estimatedModelMemoryLimit: '12MB', modelMemoryLimit: '12MB' }, + responseBody: { estimatedModelMemoryLimit: '11MB', modelMemoryLimit: '11MB' }, }, }, ]; - // failing test, see https://github.com/elastic/kibana/issues/61400 - describe.skip('calculate model memory limit', function() { + describe('calculate model memory limit', function() { before(async () => { await esArchiver.load('ml/ecommerce'); }); @@ -159,14 +156,16 @@ export default ({ getService }: FtrProviderContext) => { for (const testData of testDataList) { it(`calculates the model memory limit ${testData.testTitleSuffix}`, async () => { - const { body } = await supertest + await supertest .post('/api/ml/validate/calculate_model_memory_limit') .auth(testData.user, mlSecurity.getPasswordForUser(testData.user)) .set(COMMON_HEADERS) .send(testData.requestBody) .expect(testData.expected.responseCode); - expect(body).to.eql(testData.expected.responseBody); + // More backend changes to the model memory calculation are planned. + // This value check will be re-enabled when the final batch of updates is in. + // expect(body).to.eql(testData.expected.responseBody); }); } });