Support for per test case configuration.
The test case needs to import setup_module from CordTestConfig.
See the igmp test case example.
The test case config file is a json file that should be named as:
$testmodulename.json
Eg: if test module name is igmpTest.py, the config file should be named as:
igmpTest.json
The default test configuration variables should be placed under the class variables.
The cord tester classes should subclass unittest.TestCase and should be ideally suffixed with _exchange.
The import of setup_module function from CordTestConfig for a test case would automatically
assign/overwrite the configuration parameters (json key,value pairs) for the class to be accessed by the test cases.
Change-Id: Iae6f993a149b4547388b86245663f24bb0e2b86b
diff --git a/src/test/igmp/igmpTest.py b/src/test/igmp/igmpTest.py
index 2ada533..19e10dc 100644
--- a/src/test/igmp/igmpTest.py
+++ b/src/test/igmp/igmpTest.py
@@ -28,6 +28,8 @@
from OltConfig import OltConfig
from Channels import IgmpChannel
from CordLogger import CordLogger
+from CordTestConfig import setup_module
+
log.setLevel('INFO')
class IGMPTestState:
@@ -2180,4 +2182,3 @@
log.info('onos load config is %s'%ssm_dict)
status, code = OnosCtrl.config(ssm_dict)
assert_equal(status,False)
-