geoip: fix unittests w/o db present

pull/3988/head
Victor Julien 6 years ago
parent a7d65668ae
commit 8b87801b80

@ -373,9 +373,12 @@ static DetectGeoipData *DetectGeoipDataParse (const char *str)
SCLogDebug("negated geoip"); SCLogDebug("negated geoip");
} }
/* Initialize the geolocation engine */ /* init geo engine, but not when running as unittests */
if (InitGeolocationEngine(geoipdata) == false) if (!(RunmodeIsUnittests())) {
goto error; /* Initialize the geolocation engine */
if (InitGeolocationEngine(geoipdata) == false)
goto error;
}
return geoipdata; return geoipdata;

Loading…
Cancel
Save