diff options
-rw-r--r-- | test/scenario_test/README.md | 124 |
1 files changed, 79 insertions, 45 deletions
diff --git a/test/scenario_test/README.md b/test/scenario_test/README.md index 5a8cc5e7..5464704b 100644 --- a/test/scenario_test/README.md +++ b/test/scenario_test/README.md @@ -10,77 +10,111 @@ Setup ----- Execute the following commands inside the VM: -install the python packages and libraries required to run the test program and clone gobgp repository. +- ##### 1. Install and setting the packages required to run the scenario test. +```shell +$ sudo apt-get update +$ sudo apt-get install git python-pip python-dev iputils-arping bridge-utils lv +$ sudo wget https://raw.github.com/jpetazzo/pipework/master/pipework -O /usr/local/bin/pipework +$ sudo chmod 755 /usr/local/bin/pipework +$ sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D +$ sudo apt-get install docker-engine +$ gpasswd -a `whoami` docker ``` -% sudo su - -# apt-get update -# apt-get install git -# apt-get install python-pip -# apt-get install python-dev -# git clone https://github.com/osrg/gobgp.git -# cd ./gobgp -# GOBGP_DIR=`pwd` -# cd $GOBGP_DIR/gobgpd -# go get -v -# cd $GOBGP_DIR/test/scenario_test -# pip install -r pip-requires.txt -``` - +<br> -This step installs other packages such as Docker container and generates some helper scripts needed by the scenario test. +- ##### 2. Get each docker image from Docker Hub. +```shell +$ sudo docker pull osrg/golang:1.5 +$ sudo docker pull osrg/quagga +$ sudo docker pull osrg/gobgp ``` -# fab -f docker_control.py install_docker_and_tools +<br> -``` -Please make sure following packages are installed properly inside the VM. - - * docker - * bridge-utils - * pipework +- ##### 3. Download gobgp and install python libraries. +```shell +$ git clone https://github.com/osrg/gobgp.git +$ cd ./gobgp +$ GOBGP_DIR=`pwd` +$ cd ${GOBGP_DIR}/test/scenario_test +$ pip install -r pip-requires.txt +``` +<br> Start ----- -Please run the test script as root. - - * route_server_test.py is scenario test script. +##### All scenario test +You can run the all scenario test in the following shell script. +```shell +./run_all_tests.sh [<option>...] ``` -# python route_server_test.py -v [ --use-local ] [--go-path=<path>] +<br> -``` +##### If the individual to run the scenario test - * If you want to do malformed packet test, please run route_server_malformed_test.py + - test of bgp_router_test only +```shell +sudo -E python bgp_router_test.py [<option>...] -s ``` -# python route_server_malformed_test.py -v [ --use-local ] [ --go-path=<path> ] + - test of bgp_zebra_test only +```shell +sudo -E python bgp_zebra_test.py [<option>...] -s ``` -- If you want to do scenario test in ipv4 and ipv6 mixed environment, please run route_server_ipv4_v6_test.py + - test of evpn_test only +```shell +sudo -E python evpn_test.py [<option>...] -s ``` -# python route_server_ipv4_v6_test.py -v [ --use-local ] [ --go-path=<path> ] + - test of flow_spec_test only +```shell +sudo -E python flow_spec_test.py [<option>...] -s ``` + - test of global_policy_test only +```shell +sudo -E python global_policy_test.py [<option>...] -s +``` -After the test, test results will be shown. - -Options ------ - use [ --use-local ] option when execute gobgp program of local system. + - test of ibgp_router_test only +```shell +sudo -E python ibgp_router_test.py [<option>...] -s +``` - use [ --go-path ] option when not root and use sudo command. + - test of route_reflector_test only +```shell +sudo -E python route_reflector_test.py [<option>...] -s +``` + - test of route_server_ipv4_v6_test only +```shell +sudo -E python route_server_ipv4_v6_test.py [<option>...] -s +``` -Examples ------ - How to use [ --use-local ] option + - test of route_server_test only +```shell +sudo -E python route_server_test.py [<option>...] -s ``` -# python route_server_test.py -v --use-local + + - test of route_server_policy_test only +```shell +sudo -E python route_server_policy_test.py [<option>...] -s ``` - How to use [ --go-path=<path> ] option + - test of route_server_policy_grpc_test only +```shell +sudo -E python route_server_policy_grpc_test.py [<option>...] -s ``` -$ sudo -E python route_server_test.py -v --go-path=/usr/local/go/bin -```
\ No newline at end of file + +Options +----- +| short |long | description | +|--------|-------------------|--------------------------------| +| - | --test-prefix | filename format | +| - | --gobgp-image | output directory of dump files | +| - | --exabgp-path | filename format | +| - | --gobgp-log-level | output directory of dump files | +| - | --test-index | output directory of dump files | |