From 390a886277ba3afc6b9371cc13587b9a30ce5bdb Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Thu, 20 Aug 2020 12:09:53 -0700 Subject: *: record transaction based on control flag In case of config rollback is enabled, record northbound transaction based on a control flag. The actual frr daemons would set the flag to true via nb_init from frr_init. This will allow test daemon to bypass recording transacation to db. Signed-off-by: Chirag Shah --- tests/bgpd/test_peer_attr.c | 2 +- tests/helpers/c/main.c | 2 +- tests/lib/cli/common_cli.c | 2 +- tests/lib/cli/test_commands.c | 2 +- tests/lib/northbound/test_oper_data.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/bgpd/test_peer_attr.c b/tests/bgpd/test_peer_attr.c index f6a892df4..0979622eb 100644 --- a/tests/bgpd/test_peer_attr.c +++ b/tests/bgpd/test_peer_attr.c @@ -1387,7 +1387,7 @@ static void bgp_startup(void) master = thread_master_create(NULL); yang_init(true); - nb_init(master, NULL, 0); + nb_init(master, NULL, 0, false); bgp_master_init(master, BGP_SOCKET_SNDBUF_SIZE); bgp_option_set(BGP_OPT_NO_LISTEN); vrf_init(NULL, NULL, NULL, NULL, NULL); diff --git a/tests/helpers/c/main.c b/tests/helpers/c/main.c index 68ed16d51..7f15996da 100644 --- a/tests/helpers/c/main.c +++ b/tests/helpers/c/main.c @@ -156,7 +156,7 @@ int main(int argc, char **argv) vty_init(master, false); lib_cmd_init(); yang_init(true); - nb_init(master, NULL, 0); + nb_init(master, NULL, 0, false); /* OSPF vty inits. */ test_vty_init(); diff --git a/tests/lib/cli/common_cli.c b/tests/lib/cli/common_cli.c index 3cade4a2c..44cc6efe8 100644 --- a/tests/lib/cli/common_cli.c +++ b/tests/lib/cli/common_cli.c @@ -80,7 +80,7 @@ int main(int argc, char **argv) vty_init(master, false); lib_cmd_init(); yang_init(true); - nb_init(master, NULL, 0); + nb_init(master, NULL, 0, false); test_init(argc, argv); diff --git a/tests/lib/cli/test_commands.c b/tests/lib/cli/test_commands.c index 2b345c91e..cb512211a 100644 --- a/tests/lib/cli/test_commands.c +++ b/tests/lib/cli/test_commands.c @@ -209,7 +209,7 @@ static void test_init(void) cmd_init(1); yang_init(true); - nb_init(master, NULL, 0); + nb_init(master, NULL, 0, false); install_node(&bgp_node); install_node(&rip_node); diff --git a/tests/lib/northbound/test_oper_data.c b/tests/lib/northbound/test_oper_data.c index 202a321e1..b5f257fa2 100644 --- a/tests/lib/northbound/test_oper_data.c +++ b/tests/lib/northbound/test_oper_data.c @@ -400,7 +400,7 @@ int main(int argc, char **argv) vty_init(master, false); lib_cmd_init(); yang_init(true); - nb_init(master, modules, array_size(modules)); + nb_init(master, modules, array_size(modules), false); /* Create artificial data. */ create_data(num_vrfs, num_interfaces, num_routes); -- cgit v1.2.3