]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
file-store: add tests for stream-depth
authorGiuseppe Longo <giuseppe@glongo.it>
Wed, 10 Apr 2019 20:17:09 +0000 (22:17 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 16 Sep 2019 20:56:10 +0000 (22:56 +0200)
tests/filestore-v1-stream-depth/suricata.yaml [new file with mode: 0644]
tests/filestore-v1-stream-depth/test.rules [new file with mode: 0644]
tests/filestore-v1-stream-depth/test.yaml [new file with mode: 0644]
tests/filestore-v2.6-stream-depth/suricata.yaml [new file with mode: 0644]
tests/filestore-v2.6-stream-depth/test.rules [new file with mode: 0644]
tests/filestore-v2.6-stream-depth/test.yaml [new file with mode: 0644]

diff --git a/tests/filestore-v1-stream-depth/suricata.yaml b/tests/filestore-v1-stream-depth/suricata.yaml
new file mode 100644 (file)
index 0000000..7e3cc15
--- /dev/null
@@ -0,0 +1,23 @@
+%YAML 1.1
+---
+
+outputs:
+  - eve-log:
+      enabled: yes
+      types:
+        - files
+        - stats
+  - file-store:
+      version: 1
+      enabled: yes
+      force-filestore: yes
+      stream-depth: 0
+
+app-layer:
+  protocols:
+    http:
+      enabled: yes
+      libhtp:
+        default-config:
+          personality: IDS
+          response-body-limit: 100kb
diff --git a/tests/filestore-v1-stream-depth/test.rules b/tests/filestore-v1-stream-depth/test.rules
new file mode 100644 (file)
index 0000000..582397f
--- /dev/null
@@ -0,0 +1 @@
+alert http any any -> any any (filestore; sid:1; rev:1;)
diff --git a/tests/filestore-v1-stream-depth/test.yaml b/tests/filestore-v1-stream-depth/test.yaml
new file mode 100644 (file)
index 0000000..1dc45c0
--- /dev/null
@@ -0,0 +1,18 @@
+requires:
+  features:
+    - HAVE_LIBJANSSON
+  min-version: 5.0.0
+
+args:
+  - -k none
+
+pcap: ../filestore-v2.1-forced/suricata-update-pdf.pcap
+
+checks:
+
+  - filter:
+      count: 1
+      match:
+        event_type: fileinfo
+        fileinfo.state: "CLOSED"
+        fileinfo.stored: true
diff --git a/tests/filestore-v2.6-stream-depth/suricata.yaml b/tests/filestore-v2.6-stream-depth/suricata.yaml
new file mode 100644 (file)
index 0000000..03cdacb
--- /dev/null
@@ -0,0 +1,23 @@
+%YAML 1.1
+---
+
+outputs:
+  - eve-log:
+      enabled: yes
+      types:
+        - files
+        - stats
+  - file-store:
+      version: 2
+      enabled: yes
+      force-filestore: yes
+      stream-depth: 0
+
+app-layer:
+  protocols:
+    http:
+      enabled: yes
+      libhtp:
+        default-config:
+          personality: IDS
+          response-body-limit: 100kb
diff --git a/tests/filestore-v2.6-stream-depth/test.rules b/tests/filestore-v2.6-stream-depth/test.rules
new file mode 100644 (file)
index 0000000..582397f
--- /dev/null
@@ -0,0 +1 @@
+alert http any any -> any any (filestore; sid:1; rev:1;)
diff --git a/tests/filestore-v2.6-stream-depth/test.yaml b/tests/filestore-v2.6-stream-depth/test.yaml
new file mode 100644 (file)
index 0000000..72e1138
--- /dev/null
@@ -0,0 +1,21 @@
+requires:
+  features:
+    - HAVE_LIBJANSSON
+    - HAVE_NSS
+  files:
+    - src/output-filestore.c
+  min-version: 5.0.0
+
+args:
+  - -k none
+
+pcap: ../filestore-v2.1-forced/suricata-update-pdf.pcap
+
+checks:
+
+  - filter:
+      count: 1
+      match:
+        event_type: fileinfo
+        fileinfo.state: "CLOSED"
+        fileinfo.stored: true