diff options
author | Christian Hopps <chopps@labn.net> | 2021-05-21 01:22:14 +0200 |
---|---|---|
committer | Christian Hopps <chopps@gmail.com> | 2021-06-06 20:03:17 +0200 |
commit | deca28a33bcd913abeaf03017c52b1d2e9fd50e7 (patch) | |
tree | cac3453ef98cab1e6180430a2f2addc0b6a6efdf /staticd/static_zebra.c | |
parent | Merge pull request #8706 from LabNConsulting/chopps/fix-grpc-threading (diff) | |
download | frr-deca28a33bcd913abeaf03017c52b1d2e9fd50e7.tar.xz frr-deca28a33bcd913abeaf03017c52b1d2e9fd50e7.zip |
tests: add grpc unit test
Test uses staticd which required some C++ header protections.
Additionally, the test also runs in the ubuntu20 docker container as
grpc is supported there by the packaging system.
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'staticd/static_zebra.c')
-rw-r--r-- | staticd/static_zebra.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index 19c578c60..40275908f 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -529,6 +529,16 @@ void static_zebra_init(void) "Static Nexthop Tracking hash"); } +/* static_zebra_stop used by tests/lib/test_grpc.cpp */ +void static_zebra_stop(void) +{ + if (!zclient) + return; + zclient_stop(zclient); + zclient_free(zclient); + zclient = NULL; +} + void static_zebra_vrf_register(struct vrf *vrf) { if (vrf->vrf_id == VRF_DEFAULT) |