Merge pull request #9642 from JakubOnderka/attibute-search-500

chg: [test] Check attribute search
pull/9657/head
Jakub Onderka 2024-03-25 18:12:50 +01:00 committed by GitHub
commit 7d3cbb1abf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -1576,7 +1576,7 @@ class AttributesController extends AppController
// Force index for performance reasons see #3321
if (isset($filters['value'])) {
$this->paginate['forceIndexHint'] = '(value1, value2)';
$this->paginate['forceIndexHint'] = 'value1, value2';
}
$this->paginate['conditions'] = $params['conditions'];

View File

@ -923,6 +923,9 @@ class TestComprehensive(unittest.TestCase):
self.assertTrue(created_user.autoalert, created_user)
self.admin_misp_connector.delete_user(created_user)
def test_attribute_search(self):
request(self.admin_misp_connector, "GET", "/attributes/search/value:8.8.8.8.json")
def test_search_snort_suricata(self):
event = create_simple_event()
event.add_attribute('ip-src', '8.8.8.8', to_ids=True)