diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2019-04-15 19:03:15 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2019-04-18 13:06:14 -0300 |
| commit | 1ae9686cdf1b3e514345a5c8ddfa060d9d0429eb (patch) | |
| tree | 56e4fc149606c65c4b2aafd6d13b8812494e3068 /lib/libfrr.c | |
| parent | de4eaa3c55f3230d6c8e90581b228f52ef4c735d (diff) | |
lib: don't initialize the northbound database in the unit tests
Move call to nb_db_init() from nb_init() to frr_init() so that only
the FRR daemons will initialize the northbound database. This should
fix a few warnings when running some unit tests.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/libfrr.c')
| -rw-r--r-- | lib/libfrr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libfrr.c b/lib/libfrr.c index 1afe30d618..0d4c8d6c0f 100644 --- a/lib/libfrr.c +++ b/lib/libfrr.c @@ -38,6 +38,7 @@ #include "lib_errors.h" #include "db.h" #include "northbound_cli.h" +#include "northbound_db.h" DEFINE_HOOK(frr_late_init, (struct thread_master * tm), (tm)) DEFINE_KOOH(frr_early_fini, (), ()) @@ -654,6 +655,10 @@ struct thread_master *frr_init(void) yang_init(); nb_init(master, di->yang_modules, di->n_yang_modules); + if (nb_db_init() != NB_OK) + flog_warn(EC_LIB_NB_DATABASE, + "%s: failed to initialize northbound database", + __func__); return master; } |
