Skip to content

Commit 4b661df

Browse files
authored
[ML] Functional tests - fix job validation API test with maxModelMemoryLimit (#68501) (#68628)
This PR fixes the job validation API integration test for the scenario that the test environment has xpack.ml.max_model_memory_limit set.
1 parent ae63e84 commit 4b661df

File tree

1 file changed

+9
-0
lines changed
  • x-pack/test/api_integration/apis/ml/job_validation

1 file changed

+9
-0
lines changed

x-pack/test/api_integration/apis/ml/job_validation/validate.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,15 @@ export default ({ getService }: FtrProviderContext) => {
226226
.send(requestBody)
227227
.expect(200);
228228

229+
// The existance and value of maxModelMemoryLimit depends on ES settings
230+
// and may vary between test environments, e.g. cloud vs non-cloud,
231+
// so it should not be part of the validation
232+
body.forEach((element: any) => {
233+
if (element.hasOwnProperty('maxModelMemoryLimit')) {
234+
delete element.maxModelMemoryLimit;
235+
}
236+
});
237+
229238
expect(body).to.eql([
230239
{
231240
id: 'job_id_valid',

0 commit comments

Comments
 (0)