summaryrefslogtreecommitdiffstats
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorPascal Mathis <mail@pascalmathis.com>2018-05-27 17:52:19 +0200
committerPascal Mathis <mail@pascalmathis.com>2018-05-28 19:20:46 +0200
commit9d4f56237a22ff8f9f21912f1632e0279f4d7ec8 (patch)
treeb3ddb289dc737f1870dea57757d9d33b93baae01 /tests/Makefile.am
parentbgpd: Fix group overrides for inverted AF flags (diff)
downloadfrr-9d4f56237a22ff8f9f21912f1632e0279f4d7ec8.tar.xz
frr-9d4f56237a22ff8f9f21912f1632e0279f4d7ec8.zip
tests: Add tests for overriding BGP peer attrs
This commit introduces unit tests for BGP peer attributes and checks all three involved components, which are: - CLI Configuration Input: The appropriate commands to configure the attribute on either a peer or peer-group are being executed the same way an end user would do it. - CLI Configuration Output: The output of 'show running-config' is being checked for presence/absence of expected configuration strings. - Internal Data Structures: The internal data structures for maintaining flag/filter states (value + override + invert) are being checked after each operation to ensure the override has been implemented properly. All attributes to be tested must be defined within the 'peer_attrs' structure, which contains all peer attributes as of today and checks them with both IPv4 Unicast and IPv6 Unicast. More address families are supposed to be introduced at a later point in time. Each attribute is being checked in its own 'clean' BGP environment, so everything gets reset after each attribute to avoid any weird edge cases. The 'correct' BGP startup and shutdown routine was taken from 'bgp_main.c' to ensure that we are not leaking any memory or acting different than the real 'bgpd' would do. Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6a1932592..aefe0d06a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -18,6 +18,7 @@ TESTS_BGPD = \
bgpd/test_aspath \
bgpd/test_capability \
bgpd/test_packet \
+ bgpd/test_peer_attr \
bgpd/test_ecommunity \
bgpd/test_mp_attr \
bgpd/test_mpath
@@ -140,6 +141,7 @@ lib_cli_test_commands_SOURCES = lib/cli/test_commands_defun.c \
bgpd_test_aspath_SOURCES = bgpd/test_aspath.c
bgpd_test_capability_SOURCES = bgpd/test_capability.c
bgpd_test_packet_SOURCES = bgpd/test_packet.c
+bgpd_test_peer_attr_SOURCES = bgpd/test_peer_attr.c
bgpd_test_ecommunity_SOURCES = bgpd/test_ecommunity.c
bgpd_test_mp_attr_SOURCES = bgpd/test_mp_attr.c
bgpd_test_mpath_SOURCES = bgpd/test_mpath.c
@@ -179,6 +181,7 @@ lib_cli_test_commands_LDADD = $(ALL_TESTS_LDADD)
bgpd_test_aspath_LDADD = $(BGP_TEST_LDADD)
bgpd_test_capability_LDADD = $(BGP_TEST_LDADD)
bgpd_test_packet_LDADD = $(BGP_TEST_LDADD)
+bgpd_test_peer_attr_LDADD = $(BGP_TEST_LDADD)
bgpd_test_ecommunity_LDADD = $(BGP_TEST_LDADD)
bgpd_test_mp_attr_LDADD = $(BGP_TEST_LDADD)
bgpd_test_mpath_LDADD = $(BGP_TEST_LDADD)
@@ -193,6 +196,7 @@ EXTRA_DIST = \
bgpd/test_ecommunity.py \
bgpd/test_mp_attr.py \
bgpd/test_mpath.py \
+ bgpd/test_peer_attr.py \
helpers/python/frrsix.py \
helpers/python/frrtest.py \
isisd/test_fuzz_isis_tlv.py \