summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/addpath_test.py
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2017-07-20 11:35:59 +0900
committerIWASE Yusuke <iwase.yusuke0@gmail.com>2017-07-20 14:48:35 +0900
commit9acf225f6bcec1b9744d02181b34dd45aa92d904 (patch)
tree0447ac7ed808f84fc732c4e6ddfc1af611dfb433 /test/scenario_test/addpath_test.py
parentbe708d0b8d69ea9de3d904d2f6aaebcaabbdb55e (diff)
addpath_test: Enable to run without root privilege
see the comment of 4d7e3bd16fa51f4469a0a3f5f807c20b237ee21d Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'test/scenario_test/addpath_test.py')
-rw-r--r--test/scenario_test/addpath_test.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/test/scenario_test/addpath_test.py b/test/scenario_test/addpath_test.py
index 82b848a6..c2d2c5bf 100644
--- a/test/scenario_test/addpath_test.py
+++ b/test/scenario_test/addpath_test.py
@@ -13,18 +13,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import sys
+import time
import unittest
+
+import nose
from fabric.api import local
+
from lib import base
from lib.base import BGP_FSM_ESTABLISHED
-from lib.gobgp import *
-from lib.exabgp import *
-import sys
-import os
-import time
-import nose
+from lib.gobgp import GoBGPContainer
+from lib.exabgp import ExaBGPContainer
from lib.noseplugin import OptionParser, parser_option
-from itertools import combinations
class GoBGPTestBase(unittest.TestCase):
@@ -64,10 +64,8 @@ class GoBGPTestBase(unittest.TestCase):
self.assertTrue(len(rib) == 1)
self.assertTrue(len(rib[0]['paths']) == 3)
+
if __name__ == '__main__':
- if os.geteuid() is not 0:
- print "you are not root."
- sys.exit(1)
output = local("which docker 2>&1 > /dev/null ; echo $?", capture=True)
if int(output) is not 0:
print "docker not found"