[Bug] resolves bug in Rule version methods (#2021)

* [Bug] resolves bug in Rule version methods

* comment out unused code with notes

(cherry picked from commit 744f56d98e)
This commit is contained in:
Justin Ibarra
2022-06-07 15:40:46 -08:00
committed by github-actions[bot]
parent 57194b8e59
commit 8564185a7d
10 changed files with 123 additions and 114 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ import uuid
import eql
from detection_rules import utils
from detection_rules.packaging import load_current_package_version
from detection_rules.misc import load_current_package_version
from detection_rules.rule import TOMLRuleContents
from detection_rules.schemas import downgrade
from detection_rules.semver import Version
@@ -252,7 +252,7 @@ class TestVersionLockSchema(unittest.TestCase):
"34fde489-94b0-4500-a76f-b8a157cf9269": {
"min_stack_version": "8.2",
"previous": {
"7.13.0": {
"7.13": {
"rule_name": "Telnet Port Activity",
"sha256": "3dd4a438c915920e6ddb0a5212603af5d94fb8a6b51a32f223d930d7e3becb89",
"type": "query",
+1 -1
View File
@@ -18,7 +18,7 @@ class TestVersionLock(unittest.TestCase):
def test_previous_entries_gte_current_min_stack(self):
"""Test that all previous entries for all locks in the version lock are >= the current min_stack."""
errors = {}
min_version = get_min_supported_stack_version()
min_version = get_min_supported_stack_version(drop_patch=True)
for rule_id, lock in default_version_lock.version_lock.to_dict().items():
if 'previous' in lock:
prev_vers = [Version(v) for v in list(lock['previous'])]