diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-12-07 20:31:48 +0100 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2018-10-27 20:16:12 +0200 |
commit | 1c2facd12df7bc27758d7ea674b1e57e401fc234 (patch) | |
tree | b82aeb06586c2c7b380420ddd484964af915aee1 /tests | |
parent | Merge pull request #3235 from opensourcerouting/buildfoo-20181024 (diff) | |
download | frr-1c2facd12df7bc27758d7ea674b1e57e401fc234.tar.xz frr-1c2facd12df7bc27758d7ea674b1e57e401fc234.zip |
lib: introduce new northbound API
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bgpd/test_peer_attr.c | 4 | ||||
-rw-r--r-- | tests/helpers/c/main.c | 4 | ||||
-rw-r--r-- | tests/lib/cli/common_cli.c | 4 | ||||
-rw-r--r-- | tests/lib/cli/test_cli.refout.in | 2 | ||||
-rw-r--r-- | tests/lib/cli/test_commands.c | 4 |
5 files changed, 17 insertions, 1 deletions
diff --git a/tests/bgpd/test_peer_attr.c b/tests/bgpd/test_peer_attr.c index 8e81119f5..2f464d721 100644 --- a/tests/bgpd/test_peer_attr.c +++ b/tests/bgpd/test_peer_attr.c @@ -1383,6 +1383,8 @@ static void bgp_startup(void) LOG_DAEMON); zprivs_preinit(&bgpd_privs); zprivs_init(&bgpd_privs); + yang_init(); + nb_init(NULL, 0); master = thread_master_create(NULL); bgp_master_init(master); @@ -1428,6 +1430,8 @@ static void bgp_shutdown(void) vty_terminate(); cmd_terminate(); + nb_terminate(); + yang_terminate(); zprivs_terminate(&bgpd_privs); thread_master_free(master); master = NULL; diff --git a/tests/helpers/c/main.c b/tests/helpers/c/main.c index fed1d5a53..9e34a7c25 100644 --- a/tests/helpers/c/main.c +++ b/tests/helpers/c/main.c @@ -155,6 +155,8 @@ int main(int argc, char **argv) cmd_init(1); vty_init(master); memory_init(); + yang_init(); + nb_init(NULL, 0); /* OSPF vty inits. */ test_vty_init(); @@ -171,7 +173,7 @@ int main(int argc, char **argv) /* Configuration file read*/ if (!config_file) usage(progname, 1); - vty_read_config(config_file, NULL); + vty_read_config(NULL, config_file, NULL); test_timer_init(); diff --git a/tests/lib/cli/common_cli.c b/tests/lib/cli/common_cli.c index 0fd2f80a3..04f1e3253 100644 --- a/tests/lib/cli/common_cli.c +++ b/tests/lib/cli/common_cli.c @@ -50,6 +50,8 @@ static void vty_do_exit(int isexit) printf("\nend.\n"); cmd_terminate(); vty_terminate(); + nb_terminate(); + yang_terminate(); thread_master_free(master); closezlog(); @@ -81,6 +83,8 @@ int main(int argc, char **argv) vty_init(master); memory_init(); + yang_init(); + nb_init(NULL, 0); test_init(argc, argv); diff --git a/tests/lib/cli/test_cli.refout.in b/tests/lib/cli/test_cli.refout.in index ba789de81..af8f9ce56 100644 --- a/tests/lib/cli/test_cli.refout.in +++ b/tests/lib/cli/test_cli.refout.in @@ -313,6 +313,7 @@ frr defaults @DFLT_NAME@ hostname test
!
!
+!
line vty
!
end
@@ -328,6 +329,7 @@ frr defaults @DFLT_NAME@ hostname foohost
!
!
+!
line vty
!
end
diff --git a/tests/lib/cli/test_commands.c b/tests/lib/cli/test_commands.c index a8b42ba78..74816ece8 100644 --- a/tests/lib/cli/test_commands.c +++ b/tests/lib/cli/test_commands.c @@ -142,6 +142,8 @@ static void test_init(void) struct cmd_element *cmd; cmd_init(1); + yang_init(); + nb_init(NULL, 0); install_node(&bgp_node, NULL); install_node(&rip_node, NULL); @@ -184,6 +186,8 @@ static void test_terminate(void) XFREE(MTYPE_TMP, vector_slot(test_cmds, i)); vector_free(test_cmds); cmd_terminate(); + nb_terminate(); + yang_terminate(); } static void test_run(struct prng *prng, struct vty *vty, const char *cmd, |