]> git.ipfire.org Git - thirdparty/suricata-update.git/commitdiff
tests: test for file hash list extraction
authorJason Ish <jason.ish@oisf.net>
Tue, 12 Mar 2024 19:18:57 +0000 (13:18 -0600)
committerJason Ish <jason.ish@oisf.net>
Wed, 13 Mar 2024 22:52:14 +0000 (16:52 -0600)
tests/integration_tests.py
tests/suricata-test-rules.zip [new file with mode: 0644]

index 89705853f6e585e5b9c5be53e69cf30a543fccf7..c4b119bc66f219a75974851bea60d9a33ffb5fa8 100755 (executable)
@@ -118,6 +118,15 @@ run(common_args + [
     "testing-header-with-spaces", "file:///doesnotexist"
 ])
 
+run(common_args + [
+    "add-source",
+    "suricata-test-rules",
+    "file://{}/tests/suricata-test-rules.zip".format(os.getcwd()),
+])
+run(common_args)
+assert(os.path.exists(os.path.join(DATA_DIR, "rules/testmyids.md5")))
+assert(os.path.exists(os.path.join(DATA_DIR, "rules/testmyids.sha1")))
+assert(os.path.exists(os.path.join(DATA_DIR, "rules/testmyids.sha256")))
 
 class IntegrationTest:
     def __init__(self, configs={}):
diff --git a/tests/suricata-test-rules.zip b/tests/suricata-test-rules.zip
new file mode 100644 (file)
index 0000000..4f834f8
Binary files /dev/null and b/tests/suricata-test-rules.zip differ