Skip to content

Commit

Permalink
[BUG] Wrong field mappings for the cloud trail logs opensearch-projec…
Browse files Browse the repository at this point in the history
…t#573

Signed-off-by: Jovan Cvetkovic <[email protected]>
  • Loading branch information
jovancvetkovic3006 committed May 4, 2023
1 parent 0cc1f8f commit e018b7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cypress/integration/1_detectors.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import dns_name_rule_data from '../fixtures/integration_tests/rule/create_dns_ru
import dns_type_rule_data from '../fixtures/integration_tests/rule/create_dns_rule_with_type_selection.json';
import dns_mapping_fields from '../fixtures/integration_tests/rule/sample_dns_field_mappings.json';
import _ from 'lodash';
import { getMappingFields } from '../../public/pages/Detectors/utils/helpers';

const cypressIndexDns = 'cypress-index-dns';
const cypressIndexWindows = 'cypress-index-windows';
Expand Down Expand Up @@ -56,7 +57,9 @@ const validateFieldMappingsTable = () => {
if (_.isEmpty(properties)) {
validatePendingFieldMappingsPanel(Object.entries(mappingFields));
} else {
validateAutomaticFieldMappingsPanel(Object.entries(properties));
const items = getMappingFields(properties, [], '');
items.map((item) => [item.ruleFieldName, item.logFieldName]);
validateAutomaticFieldMappingsPanel(items);
}
});
});
Expand Down

0 comments on commit e018b7d

Please sign in to comment.