summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-11-05 09:35:56 +0900
committerHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-11-05 16:02:03 +0900
commit8d3ffc6fa47a6a86f3eca6702e9b741f0517ffbc (patch)
tree2f792fcfbab8d0430231eef8783780f33920ae75 /test/scenario_test
parentac00ab2d2d627b17672fa6dcf1750aed010a68f6 (diff)
scenario_test: update README.md
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Diffstat (limited to 'test/scenario_test')
-rw-r--r--test/scenario_test/README.md178
1 files changed, 81 insertions, 97 deletions
diff --git a/test/scenario_test/README.md b/test/scenario_test/README.md
index 5464704b..07a5e6b4 100644
--- a/test/scenario_test/README.md
+++ b/test/scenario_test/README.md
@@ -1,120 +1,104 @@
-Route Server Scenario Test
+Scenario Test
========================
-Preparation
------------
-Please set up Ubuntu 14.04 Server Edition virtual machine,
-and install golang environment inside the VM.
+This page explains how to set up a scenario test environment and run the test.
-Setup
------
-Execute the following commands inside the VM:
+## Prerequisites
-- ##### 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
-```
-<br>
-
-- ##### 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
-```
-<br>
-
-
-- ##### 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>
+Assume you finished setting up [Golang](https://golang.org/doc/install) and [Docker](https://docs.docker.com/installation/ubuntulinux/) on Ubuntu 14.04 Server VM.
+We recommend allocating memory more than 8GB to the VM.
+Because this scenario test runs a lot of test cases concurrently.
+## <a name="section0"> Check
+Please check if Golang and Docker is installed correctly and
+make sure the $GOPATH is defined.
-Start
------
-##### All scenario test
-You can run the all scenario test in the following shell script.
```shell
-./run_all_tests.sh [<option>...]
-```
-<br>
+$ go version
+go version go1.5.1 linux/amd64
+
+$ echo $GOPATH
+/home/yokoi-h/work
+
+$ sudo docker version
+Client:
+ Version: 1.9.0
+ API version: 1.21
+ Go version: go1.4.2
+ Git commit: 76d6bc9
+ Built: Tue Nov 3 17:43:42 UTC 2015
+ OS/Arch: linux/amd64
+
+Server:
+ Version: 1.9.0
+ API version: 1.21
+ Go version: go1.4.2
+ Git commit: 76d6bc9
+ Built: Tue Nov 3 17:43:42 UTC 2015
+ OS/Arch: linux/amd64
-
-##### If the individual to run the scenario test
-
- - test of bgp_router_test only
-```shell
-sudo -E python bgp_router_test.py [<option>...] -s
```
- - test of bgp_zebra_test only
-```shell
-sudo -E python bgp_zebra_test.py [<option>...] -s
-```
+## <a name="section1"> Set up dependencies
+Execute the following commands inside the VM to install the dependencies:
+
+1. Install pip and [pipework](https://github.com/jpetazzo/pipework).
+
+ ```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
+ ```
+ <br>
+
+1. Get docker images.
+ Download docker images pertaining to GoBGP testing.
+
+ ```shell
+ $ sudo docker pull golang:1.5
+ $ sudo docker pull osrg/quagga
+ $ sudo docker pull osrg/gobgp
+ ```
+ <br>
+
+1. Clone gobgp and install python libraries.
+
+ ```shell
+ $ mkdir -p $GOPATH/src/github.com/osrg
+ $ cd $GOPATH/src/github.com/osrg
+ $ git clone https://github.com/osrg/gobgp.git
+ $ cd ./gobgp/test/scenario_test
+ $ sudo pip install -r pip-requires.txt
+ ```
+<br>
- - test of evpn_test only
-```shell
-sudo -E python evpn_test.py [<option>...] -s
-```
+## <a name="section2"> Install local source code
+You need to install local source code into gobgp docker container.
+You also need this operation at every modification to the source code.
- - 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
+$ cd $GOPATH/src/github.com/osrg/gobgp
+$ sudo fab -f ./test/scenario_test/lib/base.py make_gobgp_ctn --set tag=gobgp
```
- - test of ibgp_router_test only
-```shell
-sudo -E python ibgp_router_test.py [<option>...] -s
-```
- - test of route_reflector_test only
-```shell
-sudo -E python route_reflector_test.py [<option>...] -s
-```
+## <a name="section3"> Run test
+You can run all scenario tests with run_all_tests.sh.
+If all tests passed, you can see "all tests passed successfully" at the end of the test.
- - test of route_server_ipv4_v6_test only
```shell
-sudo -E python route_server_ipv4_v6_test.py [<option>...] -s
+$ cd $GOPATH/src/github.com/osrg/gobgp/test/scenario_test
+$ ./run_all_tests.sh
+...
+OK
+all tests passed successfully
```
- - test of route_server_test only
-```shell
-sudo -E python route_server_test.py [<option>...] -s
-```
- - test of route_server_policy_test only
-```shell
-sudo -E python route_server_policy_test.py [<option>...] -s
+## <a name="section4"> Clean up
+A lot of containers are created during the test.
+Let's clean up.
```
-
- - test of route_server_policy_grpc_test only
-```shell
-sudo -E python route_server_policy_grpc_test.py [<option>...] -s
+$ sudo docker rm -f $(sudo docker ps -a -q)
```
-
-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 |