]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
Adds test case for http range logging 44/head
authorPhilippe Antoine <contact@catenacyber.fr>
Thu, 4 Apr 2019 18:55:51 +0000 (20:55 +0200)
committerPhilippe Antoine <contact@catenacyber.fr>
Thu, 18 Apr 2019 14:30:19 +0000 (16:30 +0200)
tests/http-range/README.md [new file with mode: 0644]
tests/http-range/input.pcap [new file with mode: 0644]
tests/http-range/test.yaml [new file with mode: 0644]

diff --git a/tests/http-range/README.md b/tests/http-range/README.md
new file mode 100644 (file)
index 0000000..a3d349f
--- /dev/null
@@ -0,0 +1,8 @@
+# Description
+
+Test http content range logging.
+
+# PCAP
+
+The pcap comes from running 
+`curl http://i.imgur.com/z4d4kWk.jpg -i -H "Range: bytes=500-1000"`
diff --git a/tests/http-range/input.pcap b/tests/http-range/input.pcap
new file mode 100644 (file)
index 0000000..dc92bd9
Binary files /dev/null and b/tests/http-range/input.pcap differ
diff --git a/tests/http-range/test.yaml b/tests/http-range/test.yaml
new file mode 100644 (file)
index 0000000..dd667d4
--- /dev/null
@@ -0,0 +1,21 @@
+requires:
+  features:
+    - HAVE_LIBJANSSON
+
+# disables checksum verification
+args:
+  - -k none
+
+checks:
+
+  # Check that there is one file event with content range.
+  - filter:
+      count: 1
+      match:
+        event_type: fileinfo
+        http.content_range.raw: bytes 500-1000/146515
+        http.content_range.start: 500
+        http.content_range.end: 1000
+        http.content_range.size: 146515
+        fileinfo.start: 500
+        fileinfo.end: 1000