summaryrefslogtreecommitdiffstats
path: root/vstf/vstf/agent/unittest/env/test_bridge_plugin.py
diff options
context:
space:
mode:
authorYiting.Li <liyiting@huawei.com>2016-01-22 10:46:57 +0800
committerJun Li <matthew.lijun@huawei.com>2016-01-25 01:30:21 +0000
commit07fa6d43cf0ac1baf3cd67e741f474273fbd387d (patch)
tree17ed17fa64b121bd5189070f46e14db336a50bd4 /vstf/vstf/agent/unittest/env/test_bridge_plugin.py
parent486719ea0024e683f4e90832e647becf3d5d5ab7 (diff)
JIRA: BOTTLENECKS-29
Add a end-to-end test framework delete the wrong author flag and fix some missing of the copy right Change-Id: Ia9f72ff3e523f05cd0d5e32e3349a3f6acad5bd1 Signed-off-by: Yiting.Li <liyiting@huawei.com> (cherry picked from commit 0ea3b714615e7a9383048a13695bbe4d62f028fd)
Diffstat (limited to 'vstf/vstf/agent/unittest/env/test_bridge_plugin.py')
-rwxr-xr-xvstf/vstf/agent/unittest/env/test_bridge_plugin.py56
1 files changed, 0 insertions, 56 deletions
diff --git a/vstf/vstf/agent/unittest/env/test_bridge_plugin.py b/vstf/vstf/agent/unittest/env/test_bridge_plugin.py
deleted file mode 100755
index ac4eb268..00000000
--- a/vstf/vstf/agent/unittest/env/test_bridge_plugin.py
+++ /dev/null
@@ -1,56 +0,0 @@
-"""
-Created on 2015-10-12
-
-@author: y00228926
-"""
-import unittest
-
-from vstf.common.utils import check_call
-from vstf.agent.unittest.env import model
-from vstf.agent.env.vswitch_plugins import bridge_plugin
-from vstf.agent.env.driver_plugins import manager
-
-
-class Test(model.Test):
- def setUp(self):
- super(Test, self).setUp()
- self.plugin = bridge_plugin.BridgePlugin()
- self.dr_mgr = manager.DriverPluginManager()
- self.br_cfg = {
- "name": "br1",
- "uplinks": [
- {
- "bdf": self.bdf_of_eth[0],
- },
- {
- "bdf": self.bdf_of_eth[1],
- }
- ]
- }
- self.dr_mgr.clean()
- self.dr_mgr.load(['ixgbe'])
-
- def tearDown(self):
- super(Test, self).tearDown()
-
- def _check_br_exists(self, name):
- try:
- check_call('ifconfig %s' % name, shell=True)
- except Exception, e:
- return False
- return True
-
- def test_create_br(self):
- self.plugin.clean()
- self.plugin.create_br(self.br_cfg)
- self.assertTrue(self._check_br_exists(self.br_cfg['name']))
- self.plugin.clean()
- self.assertFalse(self._check_br_exists(self.br_cfg['name']))
-
-
-if __name__ == "__main__":
- import logging
-
- logging.basicConfig(level=logging.INFO)
- LOG = logging.getLogger(__name__)
- unittest.main()