mirror_frr/tests
Pascal Mathis 9d4f56237a
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>
2018-05-28 19:20:46 +02:00
..
bgpd tests: Add tests for overriding BGP peer attrs 2018-05-28 19:20:46 +02:00
helpers *: Remove cvs control points 2017-12-05 17:28:12 -05:00
isisd isisd: add support for TLV 240 P2P Three-Way Adjacency 2018-03-10 18:38:03 +01:00
lib lib: add DFS + DOT dumping to graph datastructure 2018-04-19 13:04:58 -04:00
ospf6d ospf6d: handle realloc() failure in lsa test 2018-04-17 13:58:24 -04:00
.gitignore tests: Add tests for overriding BGP peer attrs 2018-05-28 19:20:46 +02:00
Makefile.am tests: Add tests for overriding BGP peer attrs 2018-05-28 19:20:46 +02:00
runtests.py tests: add pytest testrunners 2017-02-13 17:43:47 +01:00
test_lblmgr.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00