]> git.ipfire.org Git - thirdparty/suricata-update.git/commitdiff
tests: add integration test for --http-header
authorJason Ish <jason.ish@oisf.net>
Tue, 13 Apr 2021 19:23:34 +0000 (13:23 -0600)
committerJason Ish <jason.ish@oisf.net>
Tue, 13 Apr 2021 19:23:34 +0000 (13:23 -0600)
tests/integration_tests.py

index a421ebff3772d21b9d8cccf3e3cf20fbf6f1260a..878134a50de68c37a2d3237c8e8247fcd89889a5 100755 (executable)
@@ -91,3 +91,16 @@ run(common_args + ["remove-source", "oisf/trafficid"])
 assert(not os.path.exists(
     os.path.join(
         DATA_DIR, "update", "sources", "oisf-trafficid.yaml.disabled")))
+
+# Add a source with a custom header.
+run(common_args + [
+    "add-source", "--http-header", "Header: NoSpaces",
+    "testing-header-nospaces",
+    "file:///doesnotexist"])
+
+# Add a source with a custom header with spaces in the value
+# (https://redmine.openinfosecfoundation.org/issues/4362)
+run(common_args + [
+    "add-source",
+    "--http-header", "Authorization: Basic dXNlcjE6cGFzc3dvcmQx",
+    "testing-header-with-spaces", "file:///doesnotexist"])