mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ML] security_network module - fix type of defaultIndexPattern (#97096)
This PR fixes the defaultIndexPattern type in the security_network module definition.
This commit is contained in:
parent
e2eeb44613
commit
ad628878b1
2 changed files with 29 additions and 5 deletions
|
@ -4,11 +4,7 @@
|
|||
"description": "Detect anomalous network activity in your ECS-compatible network logs.",
|
||||
"type": "network data",
|
||||
"logoFile": "logo.json",
|
||||
"defaultIndexPattern": [
|
||||
"logs-*",
|
||||
"filebeat-*",
|
||||
"packetbeat-*"
|
||||
],
|
||||
"defaultIndexPattern": "logs-*,filebeat-*,packetbeat-*",
|
||||
"query": {
|
||||
"bool": {
|
||||
"filter": [
|
||||
|
|
|
@ -11,6 +11,8 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
|
|||
import { USER } from '../../../../functional/services/ml/security_common';
|
||||
import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common_api';
|
||||
|
||||
import { isPopulatedObject } from '../../../../../plugins/ml/common/util/object_utils';
|
||||
|
||||
const moduleIds = [
|
||||
'apache_ecs',
|
||||
'apm_jsbase',
|
||||
|
@ -70,6 +72,32 @@ export default ({ getService }: FtrProviderContext) => {
|
|||
const rspBody = await executeGetModuleRequest(moduleId, USER.ML_POWERUSER, 200);
|
||||
expect(rspBody).to.be.an(Object);
|
||||
|
||||
expect(rspBody).to.have.property('id').a('string');
|
||||
expect(rspBody).to.have.property('title').a('string');
|
||||
expect(rspBody).to.have.property('description').a('string');
|
||||
expect(rspBody).to.have.property('type').a('string');
|
||||
if (isPopulatedObject(rspBody, ['logoFile'])) {
|
||||
expect(rspBody).to.have.property('logoFile').a('string');
|
||||
}
|
||||
if (isPopulatedObject(rspBody, ['logo'])) {
|
||||
expect(rspBody).to.have.property('logo').an(Object);
|
||||
}
|
||||
if (isPopulatedObject(rspBody, ['defaultIndexPattern'])) {
|
||||
expect(rspBody).to.have.property('defaultIndexPattern').a('string');
|
||||
}
|
||||
if (isPopulatedObject(rspBody, ['query'])) {
|
||||
expect(rspBody).to.have.property('query').an(Object);
|
||||
}
|
||||
if (isPopulatedObject(rspBody, ['jobs'])) {
|
||||
expect(rspBody).to.have.property('jobs').an(Object);
|
||||
}
|
||||
if (isPopulatedObject(rspBody, ['datafeeds'])) {
|
||||
expect(rspBody).to.have.property('datafeeds').an(Object);
|
||||
}
|
||||
if (isPopulatedObject(rspBody, ['kibana'])) {
|
||||
expect(rspBody).to.have.property('kibana').an(Object);
|
||||
}
|
||||
|
||||
expect(rspBody.id).to.eql(moduleId);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue