summaryrefslogtreecommitdiffhomepage
path: root/test
AgeCommit message (Collapse)Author
2018-04-02*.md: Improvements for markdownlintIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-21table: fix handleMacMobility()FUJITA Tomonori
needs to find a diffrent ESI with the same mac address. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-10flow_spec_test: Enhance test cases with ExaBGPIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-10test/lib/exabgp: Enable to get adj-RIB-{in,out}IWASE Yusuke
"exabgpcli" supports to show adj-RIB-in and adj-RIB-out, this patch enables ExaBGPContainer to get these RIBs information. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-10test/lib/exabgp: Use exabgpcli to add/del routesIWASE Yusuke
Currently, to advertise or withdraw routes with ExaBGPContainer, we need to configure static routes via config file and restart ExaBGP daemon. In other words, we can NOT send withdrawing advertisement with ExaBGPContainer. Also, restating ExaBGP daemon frequently can make scenario test unstable, and it should be avoided. On the other hand, with ExaBGP version 4.0.5 or later(*), we can advertise or withdraw routes using "exabgpcli" without restating ExaBGP daemon (or writing application which calls ExaBGP's APIs). This patch fixes to use "exabgpcli" and reduces the number of restating ExaBGP daemon. Note: According to this change, adding routes into ExaBGP should be called after adding neighbor. (*): "exabgpcli" is introduced at version 4.0.2, but has some bugs related to Python 3 compatibility and FlowSpec rules combinations, then we need to use version 4.0.5 or later. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-27scenario_test: Enable to try assertion several timesIWASE Yusuke
Some times, on Travis-CI, some test cases fail unexpectedly in checking paths in RIBs due to advertisements are not yet received from other routers. Currently, in order to avoid this unexpected result, "time.sleep" is inserted after adding new routes, but it is not enough. This patch introduces a new function to enable to do assertion several times and avoid failure with the first assertion. Note: This patch does not introduces this change into all test cases, do only into some test cases which fail relatively frequently. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-27test/lib/gobgp: Adding routes without reloadingIWASE Yusuke
With the current implementation, when adding routes on GoBGPContainer, we re-configure and reload daemon, then add routes using CLI command. Differ from QuaggaBGPContainer, when deletion of routes, reloading is not required, but if reloading daemon frequently, we need to wait for the daemon restarting, it causes testing time longer and unstable. This patch enables to add routes without reloading daemon. Note: According to this change, adding routes should be called after starting daemons. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-27test/lib/Quagga: Use vtysh to add/del routesIWASE Yusuke
Currently, to advertise or withdraw routes on QuaggaBGPContainer, we need to configure static routes in configure file and restart Quagga daemons. In other words, we can NOT send withdrawing advertisement from Quagga side. Also, restating Quagga daemons frequently can make scenario test unstable, and it should be avoided. This patch fixes to use "vtysh" and reduces the number of restating Quagga daemons. Note: According to this change, adding routes on Quagga should be called after starting daemons. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-19test/lib/{bird,gobgp,quagga,yabgp}: Wait for daemon bootIWASE Yusuke
Currently, scenario test library does not wait for the daemons boot in containers at starting up or after sending SIGHUP for reloading new configurations. So some test cases (e.g., graceful_restart_test.py) fails occasionally to insert static routes into GoBGP after reloading new configurations. This patch fixes to wait for the daemons boot and improves the stability of scenario tests. Note: This patch does not introduce these improvements to BagpipeContainer and ExaBGPContainer, because; - Docker image for BaGPipe, which used in scenario test library, is too old and BagpipeContainer does not seem to be used in the current test cases. - The version of ExaBGP in "osrg/exabgp" Docker image has no way to ask the daemon status other than "ps" command ("ps" is already done, but not enough). If "exabgpcli" is available on ExaBGP container, which is required the next release of 4.0.2 or 3.4.21, we can use it to check whether ExaBGP is started up or not. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-19flow_spec_test: Enhance test cases with YABGPIWASE Yusuke
This patch extends test cases using YABGP; - Test "gobgp" command outputs representations with IPv4/IPv6 - IPv4 FlowSpec rules advertisements and withdraws TODO: Supports test cases for the IPv6 FlowSpec rules withdraws when YABGP supports the IPv6 FlowSpec or when ExaBGP fixes issues(*) of logging the received FlowSpec rules. (*): ExaBGP (v4.0.2 or v3.4.21) will failed to log the received FlowSpec rules which contains some specific operators/operands (e.g., "!=" or empty operator). Then, we need to wait for the next release to implement more test cases. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-19test/lib: Add YABGP containerIWASE Yusuke
Note: This implementation supposes the YABGP version 0.4.0. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-19test/lib/base: Delete FlowSpec routes with keywordIWASE Yusuke
Currently, in case of the FlowSpec routes, "prefix" value which stored on each container instance is just a keyword and not valid NLRI arguments for adding or deleting routes. So when deleting routes with "route" keyword, it is required to construct the NLRI arguments using "matchs" value. This patch enables to construct the valid NLIR arguments as "prefix" value when adding the FlowSpec routes and enables to delete the FlowSpec routes with "route" keyword. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-09bgp_zebra_test: Fix ping reachability testsIWASE Yusuke
Currently, we test the ping reachability of Quagga(o1) -> GoBGP(g1) -> Quagga(q1) in this scenario test, but in this case, two Quagga routers belong to the connected networks of GoBGP router and ping will succeed without the BGP advertisements. Then, even if GoBGP failed to install the received routes to the Linux routeing table via Zebra daemon, this test case will pass. This patch fixes to test the reachability of Quagga(o1) -> GoBGP(g1) -> Quagga(q1) -> Quagga(o2) and makes the advertised routes required to be installed into the g1's routing table. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-09test/lib/base: Fix typosIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-09test/lib/{gobgp,quagga}: IPv6 forwarding in zebra.confIWASE Yusuke
With this patch, it is not required to enable IPv6 forwarding by using "sysctl" explicitly in Quagga or GoBGP(Zebra enabled) containers. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-09test/lib/base: Removes redundant routes from hostIWASE Yusuke
When creating a new Docker network (Linux Bridge), some routes to its subnet will be installed in to the container host's routing table. This routes enable containers to communicate each other through the container host's rouging table, then causes the unexpected success of scenario tests (e.g., ping between containers). This patch removes the unexpected routes from the container host and avoid this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-28addpath_test: Wait for re-establishment with ExaBGPIWASE Yusuke
When adding or deleting routes in ExaBGPContainer, it is required to restart ExaBGPContainer with the current implementation. This patch fixes to wait for the re-establishment with ExaBGP and improves the stability of this test case. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-16use label for containers and networks in order to avoid colliding with othersImcom Jin
2017-12-07test: use the current PYTHONPATH in run_all_tests.shFUJITA Tomonori
On some environments, it's necessary to use the current PYTHONPATH to run python. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-27test/lib: Allow unconfigured peer-as for Unnumbered BGPSatoshi Fujimoto
For Unnumbered BGP, neighbor AS number isn't needed to be specified, so 'peer-as' should not be specified in the scenario test for Unnumbered BGP. However, currently 'peer-as' is always specified in test/lib/gobgp.py This commit solves this by not specifying `peer-as` if 'neighbor-interface' is configured. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-07test: Add scenario test for BGP ConfederationSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-07test/lib: Add bgp config structure for GoBGP/Quagga containersSatoshi Fujimoto
This commit introduces 'bgp_config' attribute for GoBGP/Quagga containers to configure complex settings. Adding to this, this commit enables to configure BGP confederation settings to GoBGP/Quagga conrainers. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-07test/lib: Enhancement on Get Rib library on QuaggaSatoshi Fujimoto
For Quagga containers, currently, when we use get_global_rib() without specifying prefix, we cannot get AS_PATH and other attributes. And when we use get_global_rib() with prefix, we can get only one path even if there is multiple paths for a destination. This commit fixes these problems by refining test/lib/quagga.py. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-07travis: Update .travis.ymlIWASE Yusuke
For scenario_test, Python build environment is more suitable rather than Go build environment, because scenario_test is written in Python and the building source codes will be done on Docker containers. This patch fixes scenario_test to use Python build environment and reduces "sudo" executions in order to use interpreter of virtualenv. Note: On Travis-Ci, the Python interpreter of sudoer is older version, and when install packages with "sudo pip", InsecurePlatformWarning will be displayed. So it is better to use the newer interpreter of virtualenv. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-09-29test: Add Scenario tests for Revised Error HandlingSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-09-24test/lib/base: Reduce redundant build stepsIWASE Yusuke
Currently, the build steps of "go get" and removing the downloaded directory are not effective steps. For example, "go get" for downloading dependencies can be replaced with "dep ensure". Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-09-14test/lib/gobgp,quagga: Adopt to Debian 9 based osrg/quagga:v1.0IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-09-14test/lib/gobgp: Add shared volume for QuaggaIWASE Yusuke
Currently, daemons of Quagga will fails to output their logs, because those daemons (quagga user) does not have the permission to access to the GoBGP config directory (owned by root user). This patch prepares the volume for quagga user and enables daemons of Quagga to output logs. With this patch, those logs will be output into "TEST_BASE_DIR/TEST_PREFIX/<CONTAINER_NAME>/quagga/" directory. (default: /tmp/gobgp/<CONTAINER_NAME>/quagga/") Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-08-04update travis-ci for depFUJITA Tomonori
libraries are installed into vendor directory so we can't build go code outside. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-30addpath_test: Test cases for routes from CLIIWASE Yusuke
This patch adds test cases for adding/deleting routes from GoBGP CLI. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-30addpath_test: Test cases for send add-pathsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-30test/lib/gobgp: Get community/identifier via get_*_rib()IWASE Yusuke
This patch enables GoBGPContainer to get community and identifier for each route via get_global_rib() and get_local_rib() methods. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-30test/lib/gobgp: Add route with identifier and communityIWASE Yusuke
This patch enables GoBGPContainer to add routes with "identifier" and "community" via add_route() method. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-30test/lib/gobgp: Enable GoBGPContainer to del a routeIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-30test/lib/base: Avoid to del all routes without identifier specifiedIWASE Yusuke
Currently, del_route() with "identifier=None" deletes all routes even if some installed routes have the valid identifier. This patch fixes to delete only route which exactly matches against the given identifier. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-20addpath_test: Test cases with non add-path routerIWASE Yusuke
This patch adds the test cases for the mixed situation of add-path enabled routers and non add-path enabled routers and advertising and withdrawing routes in such situation. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-20test/lib/base/BGPContainer: Enable to delete routeIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-20addpath_test: Enable to run without root privilegeIWASE Yusuke
see the comment of 4d7e3bd16fa51f4469a0a3f5f807c20b237ee21d Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-05test: add addpath_test.pyISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-06-08test: Test for Graceful Restart with multiple peersSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-06-07test: ignore the failure of caching dependeny with building docker imageFUJITA Tomonori
`go get -d github.com/osrg/gobgp/...` could fail (e.g., an imported library has gone). After that, we build a docker image from modified source code. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-23flowspec: handling of >2 logical elements and fixed testDenis Shevchenko
2017-05-10*: support replace-peer-as (aka as-override)Wataru Ishida
we use the term replace-peer-as instead of as-override since openconfig is using it. cli ``` $ gobgp n add <neighbor-addr> as <asn> replace-peer-as ``` config ``` neighbor: config: peer-as: <asn> neighbor-address: <neighbor-addr> as-path-options: config: replace-peer-as: true ``` Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-05-10*: support remove private asWataru Ishida
cli ``` $ gobgp n add <neighbor-addr> as <asn> remove-private-as (all|replace) ``` config ``` neighbor: config: peer-as: <asn> neighbor-address: <neighbor-addr> remove-private-as: all ``` Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-05-09server: ignore routes when local AS is in AS_PATHISHIDA Wataru
RFC4271 9.1.2 Phase 2: Route Selection If the AS_PATH attribute of a BGP route contains an AS loop, the BGP route should be excluded from the Phase 2 decision function. AS loop detection is done by scanning the full AS path (as specified in the AS_PATH attribute), and checking that the autonomous system number of the local system does not appear in the AS path. Operations of a BGP speaker that is configured to accept routes with its own autonomous system number in the AS path are outside the scope of this document. Also this commit adds support for allow-own-as option to relax this. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-04-21test: fix container build for testFUJITA Tomonori
fix the regression of commit e429c1aaf4dd85459dfafc1a5efac9d4778370f6 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-04-18test: change Dockerfile for faster container buildFUJITA Tomonori
use cache wisely. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-04-18Revert "test/lib/gobgp: Use local GoBGP executables in contaier"FUJITA Tomonori
This reverts commit 47ab84e34caeb7c89b26271bf84959011bc8ed19. using the same binaries on a host and inside a container isn't always feasible (by default, not statically linked binary). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-04-18test: remove unnecessary root check in bgp_unnumbered_test.pyFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-04-17scenario_test/README: Update commands to clean upIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>