forked from elastic/detection-rules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_rules_remote.py
21 lines (16 loc) · 902 Bytes
/
test_rules_remote.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
# or more contributor license agreements. Licensed under the Elastic License
# 2.0; you may not use this file except in compliance with the Elastic License
# 2.0.
import unittest
from .base import BaseRuleTest
from detection_rules.misc import get_default_config
# from detection_rules.remote_validation import RemoteValidator
@unittest.skipIf(get_default_config() is None, 'Skipping remote validation due to missing config')
class TestRemoteRules(BaseRuleTest):
"""Test rules against a remote Elastic stack instance."""
# def test_esql_rules(self):
# """Temporarily explicitly test all ES|QL rules remotely pending parsing lib."""
# esql_rules = [r for r in self.all_rules if r.contents.data.type == 'esql']
# rv = RemoteValidator(parse_config=True)
# rv.validate_rules(esql_rules)