mirror of https://github.com/MISP/MISP
Merge pull request #9642 from JakubOnderka/attibute-search-500
chg: [test] Check attribute searchpull/9657/head
commit
7d3cbb1abf
|
@ -1576,7 +1576,7 @@ class AttributesController extends AppController
|
||||||
|
|
||||||
// Force index for performance reasons see #3321
|
// Force index for performance reasons see #3321
|
||||||
if (isset($filters['value'])) {
|
if (isset($filters['value'])) {
|
||||||
$this->paginate['forceIndexHint'] = '(value1, value2)';
|
$this->paginate['forceIndexHint'] = 'value1, value2';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->paginate['conditions'] = $params['conditions'];
|
$this->paginate['conditions'] = $params['conditions'];
|
||||||
|
|
|
@ -923,6 +923,9 @@ class TestComprehensive(unittest.TestCase):
|
||||||
self.assertTrue(created_user.autoalert, created_user)
|
self.assertTrue(created_user.autoalert, created_user)
|
||||||
self.admin_misp_connector.delete_user(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):
|
def test_search_snort_suricata(self):
|
||||||
event = create_simple_event()
|
event = create_simple_event()
|
||||||
event.add_attribute('ip-src', '8.8.8.8', to_ids=True)
|
event.add_attribute('ip-src', '8.8.8.8', to_ids=True)
|
||||||
|
|
Loading…
Reference in New Issue