]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
filestore-v2.4-forced-with-meta: use "match" tests
authorJason Ish <jason.ish@oisf.net>
Tue, 4 Aug 2020 21:17:10 +0000 (15:17 -0600)
committerJason Ish <jason.ish@oisf.net>
Tue, 4 Aug 2020 21:17:10 +0000 (15:17 -0600)
Remove jq tests, these can now be done with the match
syntax.

tests/filestore-v2.4-forced-with-meta/test.yaml

index 62e043b4ad37992f7e8f423a3ed012b827ff3875..9b46103c0d7871c0ae67bd16f0d565b43a6e080d 100644 (file)
@@ -9,17 +9,21 @@ pcap: ../filestore-v2.1-forced/suricata-update-pdf.pcap
 
 checks:
 
-  # Check how many lines were logged to fast.log.
-  - shell:
-      args: cat filestore/48/48d179a2f8d17331446c7a75a082851eee9ad841705ed5fbce730f51a0598d62.1515441287.1.json | jq -c 'select(.fileinfo.sha256=="48d179a2f8d17331446c7a75a082851eee9ad841705ed5fbce730f51a0598d62")' | wc -l | xargs
-      expect: 1
-
-  - shell:
-      args: cat filestore/48/48d179a2f8d17331446c7a75a082851eee9ad841705ed5fbce730f51a0598d62.1515441287.1.json | jq -c 'select(.fileinfo.stored==true)' | wc -l | xargs
-      expect: 1
+  - filter:
+      filename: "filestore/48/48d179a2f8d17331446c7a75a082851eee9ad841705ed5fbce730f51a0598d62.1515441287.1.json"
+      count: 1
+      match:
+        fileinfo.sha256: 48d179a2f8d17331446c7a75a082851eee9ad841705ed5fbce730f51a0598d62
 
   - filter:
+      filename: "filestore/48/48d179a2f8d17331446c7a75a082851eee9ad841705ed5fbce730f51a0598d62.1515441287.1.json"
       count: 1
+      match:
+        fileinfo.stored: true
+      
+
+  - filter:
       filename: "filestore/48/48d179a2f8d17331446c7a75a082851eee9ad841705ed5fbce730f51a0598d62.1515441287.1.json"
+      count: 1
       match:
         has-key: flow_id