summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChirag Shah <chirag@nvidia.com>2020-08-20 21:09:53 +0200
committerChirag Shah <chirag@nvidia.com>2020-08-20 23:12:04 +0200
commit390a886277ba3afc6b9371cc13587b9a30ce5bdb (patch)
tree4894f96aac6079993493eb818a159bcebab91052 /tests
parentlib: add yang modules to native module list (diff)
downloadfrr-390a886277ba3afc6b9371cc13587b9a30ce5bdb.tar.xz
frr-390a886277ba3afc6b9371cc13587b9a30ce5bdb.zip
*: 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 <chirag@nvidia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bgpd/test_peer_attr.c2
-rw-r--r--tests/helpers/c/main.c2
-rw-r--r--tests/lib/cli/common_cli.c2
-rw-r--r--tests/lib/cli/test_commands.c2
-rw-r--r--tests/lib/northbound/test_oper_data.c2
5 files changed, 5 insertions, 5 deletions
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);