Adding init.py for the test dirs to append path to enable import of test modules
Modifying dhcp, igmp, tls test cases to activate, configure app, and other changes
diff --git a/src/test/tls/tlsAuthTest.py b/src/test/tls/tlsAuthTest.py
index 22d1c76..f39f116 100644
--- a/src/test/tls/tlsAuthTest.py
+++ b/src/test/tls/tlsAuthTest.py
@@ -1,11 +1,34 @@
import unittest
-import os,sys
-CORD_TEST_UTILS = 'utils'
-test_root = os.getenv('CORD_TEST_ROOT') or './'
-sys.path.append(test_root + CORD_TEST_UTILS)
+import time
+import os
+from nose.tools import *
from EapTLS import TLSAuthTest
+from OnosCtrl import OnosCtrl
class eap_auth_exchange(unittest.TestCase):
+
+ app = 'org.onosproject.aaa'
+
+ def setUp(self):
+ self.onos_ctrl = OnosCtrl(self.app)
+ self.onos_aaa_config()
+
+ def onos_aaa_config(self):
+ aaa_dict = {'apps' : { 'org.onosproject.aaa' : { 'AAA' : { 'radiusSecret': 'radius_password',
+ 'radiusIp': '172.17.0.2' } } } }
+ radius_ip = os.getenv('ONOS_AAA_IP') or '172.17.0.2'
+ aaa_dict['apps']['org.onosproject.aaa']['AAA']['radiusIp'] = radius_ip
+ self.onos_ctrl.activate()
+ time.sleep(2)
+ self.onos_load_config(aaa_dict)
+
+ def onos_load_config(self, config):
+ status, code = self.onos_ctrl.config(config)
+ if status is False:
+ log.info('Configure request for AAA returned status %d' %code)
+ assert_equal(status, True)
+ time.sleep(2)
+
def test_eap_tls(self):
tls = TLSAuthTest()
tls.runTest()