From af2e25bbab01596e94761a32bf770ef5862f703d Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Tue, 12 Mar 2024 13:18:57 -0600 Subject: [PATCH] tests: test for file hash list extraction --- tests/integration_tests.py | 9 +++++++++ tests/suricata-test-rules.zip | Bin 0 -> 2391 bytes 2 files changed, 9 insertions(+) create mode 100644 tests/suricata-test-rules.zip diff --git a/tests/integration_tests.py b/tests/integration_tests.py index 8970585..c4b119b 100755 --- a/tests/integration_tests.py +++ b/tests/integration_tests.py @@ -118,6 +118,15 @@ def delete(path): "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 index 0000000000000000000000000000000000000000..4f834f8e0b2af7b33b8e2ca13993f14cffd45ee7 GIT binary patch literal 2391 zcmWIWW@h1H0D-e{IT2t6l#pcLWGF5z%1llyNz^S#EiTb5D$PkP*3C`K%+n7IVP#-^ zyyQb_08~E*SigV>ojt;B4Ps%rBa z4Bt0yF9^RcP|m;EBYk$`PQi?CW=-AQd+pt4Gu5Pf~s$OUfRsd3Hy_K+e0?${_n&O;$7E%Z7iOm zQIme=!HSzd?aR&;)!w}5zNKob1AoDGdc^i&sW#U9Zn|%j*GaOP6Lfev-U2ZBtBEh+wP6S>;tp{71OO0@hc|n=JA; zyJY=I`6a7vW&PY^v>~WcZNpB17d`q#g;Ng&WS&c%=x~htpHA8oC$X~`Z(s45X*=p( zdi=w?H$?TQM`)(WG|pvLp2_Z-xYeT}JMyyQv?x)|#l=caXH`11k4|m%;u9&giQfus@%%V zlw!Ty6jOLsNH$L~NHk1MG)YV{H%?15PBl+XF*iy}HcU-2O){}GQcytXE2${qf_Vgz z13As!9S z=<>s@Y8Q+4lVvlsBDI&KK3l>R8K%1OsOrwCGc}J^In3MYRG8K^b?H(@4v8pjk)_ij zC8M&7R43(m7rHG{ydotad{Rz8{HT($m#&eKsdEJDlLb+1A`TnRNhHcL!2AOV(#Nfp zJQhIzfUqtp{wdB#G=zJ{+|u04&@?&8%-qbx%rYe{$=E2#BGug7Ako0m)HK=9%orHb z2C1p|!}gH+V`mSbI|6`MpG3D9nVP{}!+LPHV1oe%!-adAMvc=wex%3gNj=Q1& z+6e>#5Q?a317;rfiUVX2Fa-mF0}$h^hR~}Ke9i=AYX|^2^C!?dIE}@~