[ML] Enable PUT trained model API integration tests (#189697)

## Summary

Closes https://github.com/elastic/kibana/issues/189637


### Checklist

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
This commit is contained in:
Dima Arnautov 2024-08-14 13:54:19 +02:00 committed by GitHub
parent 2a33601c9a
commit 0e18fb39f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,8 +15,7 @@ export default ({ getService }: FtrProviderContext) => {
const supertest = getService('supertestWithoutAuth');
const ml = getService('ml');
// FLAKY: https://github.com/elastic/kibana/issues/189637
describe.skip('PUT trained_models', () => {
describe('PUT trained_models', function () {
before(async () => {
await ml.api.initSavedObjects();
await ml.testResources.setKibanaTimeZoneToUTC();
@ -38,9 +37,8 @@ export default ({ getService }: FtrProviderContext) => {
.send(requestBody);
ml.api.assertResponseStatusCode(200, putResponseStatus, putResponseBody);
expect(omit(putResponseBody, 'create_time')).to.eql({
expect(omit(putResponseBody, ['create_time', 'model_type'])).to.eql({
model_id: 'dfa_regression_model_n_0',
model_type: 'tree_ensemble',
created_by: 'api_user',
version: '12.0.0',
model_size_bytes: 304,