From eb67bb442ee60be9295eed1faeb8268f8b049adc Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 12 Jan 2010 22:27:54 +0100 Subject: [PATCH] Fixup unittests that use buffers that simulate configuration files. They now include the YAML header. --- src/detect.c | 3 +++ src/stream-tcp.c | 6 ++++++ src/util-rule-vars.c | 3 +++ 3 files changed, 12 insertions(+) diff --git a/src/detect.c b/src/detect.c index b8b984e2a8..a4dc9c896f 100644 --- a/src/detect.c +++ b/src/detect.c @@ -3055,6 +3055,9 @@ void SigTableRegisterTests(void) { #include "flow-util.h" static const char *dummy_conf_string = + "%YAML 1.1\n" + "---\n" + "\n" "default-log-dir: /var/log/suricata\n" "\n" "logging:\n" diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 720d8906cc..4f97fade9b 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -3857,6 +3857,9 @@ end: /* Dummy conf string to setup the OS policy for unit testing */ static const char *dummy_conf_string = + "%YAML 1.1\n" + "---\n" + "\n" "default-log-dir: /var/log/eidps\n" "\n" "logging:\n" @@ -3877,6 +3880,9 @@ static const char *dummy_conf_string = "\n"; /* Dummy conf string to setup the OS policy for unit testing */ static const char *dummy_conf_string1 = + "%YAML 1.1\n" + "---\n" + "\n" "default-log-dir: /var/log/eidps\n" "\n" "logging:\n" diff --git a/src/util-rule-vars.c b/src/util-rule-vars.c index c3251e432b..23ce4d24ab 100644 --- a/src/util-rule-vars.c +++ b/src/util-rule-vars.c @@ -91,6 +91,9 @@ char *SCRuleVarsGetConfVar(const char *conf_var_name, /**********************************Unittests***********************************/ static const char *dummy_conf_string = + "%YAML 1.1\n" + "---\n" + "\n" "default-log-dir: /var/log/suricata\n" "\n" "logging:\n"