From: Jason Ish Date: Tue, 13 Apr 2021 19:23:34 +0000 (-0600) Subject: tests: add integration test for --http-header X-Git-Tag: 1.3.0rc1~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9b5ef1ca92cc67305296029ab7ac6c0ca7c4da6;p=thirdparty%2Fsuricata-update.git tests: add integration test for --http-header --- diff --git a/tests/integration_tests.py b/tests/integration_tests.py index a421ebf..878134a 100755 --- a/tests/integration_tests.py +++ b/tests/integration_tests.py @@ -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"])