Skip to content

Commit

Permalink
updated command header for create rule; changed url for searching rules
Browse files Browse the repository at this point in the history
Signed-off-by: Amardeepsingh Siglani <[email protected]>
  • Loading branch information
amsiglan committed Sep 8, 2023
1 parent 5bbca38 commit 7ae18e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import sample_dns_index_settings from '../../../fixtures/plugins/security-analyt
import dns_name_rule_data from '../../../fixtures/plugins/security-analytics-dashboards-plugin/integration_tests/rule/create_dns_rule_with_name_selection.json';
import dns_type_rule_data from '../../../fixtures/plugins/security-analytics-dashboards-plugin/integration_tests/rule/create_dns_rule_with_type_selection.json';
import _ from 'lodash';
import { BACKEND_BASE_PATH } from '../../../utils/base_constants';

const cypressIndexDns = 'cypress-index-dns';
const cypressIndexWindows = 'cypress-index-windows';
Expand Down Expand Up @@ -265,7 +266,7 @@ describe('Detectors', () => {
cy
.request(
'POST',
'_plugins/_security_analytics/rules/_search?prePackaged=true',
`${BACKEND_BASE_PATH}${NODE_API.RULES_BASE}/_search?pre_packaged=true`,
{
from: 0,
size: 5000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ Cypress.Commands.add('createRule', (ruleJSON) => {
method: 'POST',
url: `${OPENSEARCH_DASHBOARDS}${NODE_API.RULES_BASE}?category=${ruleJSON.category}`,
body: JSON.stringify(ruleJSON),
headers: {
'osd-xsrf': true
}
});
});

Expand Down

0 comments on commit 7ae18e7

Please sign in to comment.