[ML] Functional tests - fix job validation API test with maxModelMemoryLimit (#68501)

This PR fixes the job validation API integration test for the scenario that the test environment has xpack.ml.max_model_memory_limit set.
This commit is contained in:
Robert Oskamp 2020-06-09 11:28:43 +02:00 committed by GitHub
parent 5377dbb758
commit 0b3391a8fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -226,6 +226,15 @@ export default ({ getService }: FtrProviderContext) => {
.send(requestBody)
.expect(200);
// The existance and value of maxModelMemoryLimit depends on ES settings
// and may vary between test environments, e.g. cloud vs non-cloud,
// so it should not be part of the validation
body.forEach((element: any) => {
if (element.hasOwnProperty('maxModelMemoryLimit')) {
delete element.maxModelMemoryLimit;
}
});
expect(body).to.eql([
{
id: 'job_id_valid',