From 9935af67d69194c24b73332320a244d3cdea6400 Mon Sep 17 00:00:00 2001 From: Jhonny Sousa Date: Sat, 18 Oct 2025 22:19:48 -0300 Subject: [PATCH] detect/filestore: Convert unittest to new FAIL/PASS API Ticket: #6317 --- src/detect-filestore.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/detect-filestore.c b/src/detect-filestore.c index fcfa19fb71..f76d8ad015 100644 --- a/src/detect-filestore.c +++ b/src/detect-filestore.c @@ -510,23 +510,20 @@ static void DetectFilestoreFree(DetectEngineCtx *de_ctx, void *ptr) */ static int DetectFilestoreTest01(void) { - DetectEngineCtx *de_ctx = NULL; - int result = 1; - - de_ctx = DetectEngineCtxInit(); + DetectEngineCtx *de_ctx = DetectEngineCtxInit(); FAIL_IF(de_ctx == NULL); de_ctx->flags |= DE_QUIET; - de_ctx->sig_list = SigInit(de_ctx,"alert http any any -> any any " - "(bypass; filestore; " - "content:\"message\"; http_host; " - "sid:1;)"); - FAIL_IF_NOT_NULL(de_ctx->sig_list); + Signature *s = DetectEngineAppendSig(de_ctx, "alert http any any -> any any " + "(bypass; filestore; " + "content:\"message\"; http_host; " + "sid:1;)"); + FAIL_IF_NOT_NULL(s); DetectEngineCtxFree(de_ctx); - return result; + PASS; } void DetectFilestoreRegisterTests(void)