Skip to content

Commit e148eb4

Browse files
authored
[ML] Anomaly Detection: Fix test to reflect model memory limit change. (#65967)
Adapt jest test mocks to consider update introduced in #65652.
1 parent af102af commit e148eb4

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

x-pack/plugins/ml/server/models/job_validation/job_validation.test.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ const callWithRequest: APICaller = (method: string) => {
1414
if (method === 'fieldCaps') {
1515
resolve({ fields: [] });
1616
return;
17+
} else if (method === 'ml.info') {
18+
resolve({
19+
limits: {
20+
effective_max_model_memory_limit: '100MB',
21+
max_model_memory_limit: '1GB',
22+
},
23+
});
1724
}
1825
resolve({});
1926
}) as Promise<any>;
@@ -291,7 +298,7 @@ describe('ML - validateJob', () => {
291298
});
292299

293300
// Failing https://github.com/elastic/kibana/issues/65865
294-
it.skip('basic validation passes, extended checks return some messages', () => {
301+
it('basic validation passes, extended checks return some messages', () => {
295302
const payload = getBasicPayload();
296303
return validateJob(callWithRequest, payload).then(messages => {
297304
const ids = messages.map(m => m.id);
@@ -305,7 +312,7 @@ describe('ML - validateJob', () => {
305312
});
306313

307314
// Failing https://github.com/elastic/kibana/issues/65866
308-
it.skip('categorization job using mlcategory passes aggregatable field check', () => {
315+
it('categorization job using mlcategory passes aggregatable field check', () => {
309316
const payload: any = {
310317
job: {
311318
job_id: 'categorization_test',
@@ -372,7 +379,7 @@ describe('ML - validateJob', () => {
372379
});
373380

374381
// Failing https://github.com/elastic/kibana/issues/65867
375-
it.skip('script field not reported as non aggregatable', () => {
382+
it('script field not reported as non aggregatable', () => {
376383
const payload: any = {
377384
job: {
378385
job_id: 'categorization_test',

0 commit comments

Comments
 (0)