Skip to content

Commit

Permalink
[ML] Functional tests - fix job validation API test with maxModelMemo…
Browse files Browse the repository at this point in the history
…ryLimit (#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.
  • Loading branch information
pheyos authored Jun 9, 2020
1 parent 5377dbb commit 0b3391a
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 0b3391a

Please sign in to comment.