16 lines
490 B
Python
16 lines
490 B
Python
import pathlib
|
|
import unittest
|
|
|
|
|
|
class RuleUpdateScriptTests(unittest.TestCase):
|
|
def test_update_is_validated_and_rolls_back_on_failure(self):
|
|
script = pathlib.Path("scripts/update-rules.sh").read_text(encoding="utf-8")
|
|
self.assertIn("suricata-update", script)
|
|
self.assertIn("suricata -T", script)
|
|
self.assertIn("restore_previous_rules", script)
|
|
self.assertIn("previous known-good rules", script)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|