blob: 1d87e3e1fc951336cedb172caa89087cc2460754 [file] [log] [blame]
adminbae64d82013-08-01 10:50:15 -07001class ExperimentTest:
2 '''
3 Testing of the Experimental Mode
4 '''
5
6 def __init__(self):
7 self.default = ""
8
9 def CASE1(self,main):
10 '''
11 Testing the configuration of the host by using checkIP functionof Mininet driver
12 '''
13 main.EXPERIMENTAL_MODE = main.TRUE
14 main.case("Testing the configuration of the host")
15 main.step("Host IP Checking using checkIP")
16 result = main.Mininet1.checkIP(main.params['CASE1']['destination'])
17 main.step("Verifying the result")
18 utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Host h2 IP address configured",onfail="Host h2 IP address didn't configured")
19 main.step("Calling Non Existing API for Experimental Mode")
20 testReturn = main.POX2.verify_flow(returns=main.TRUE)
21 utilities.assert_equals(expect=main.TRUE,actual=testReturn,onpass="Host h2 IP address configured",onfail="Host h2 IP address didn't configured")
22
23 def CASE2(self,main):
24 '''
25 Testing of the reachability of the hosts by using pingall of Mininet driver
26 '''
27 main.EXPERIMENTAL_MODE = main.TRUE
28 main.case("Testing Reachabilty of all the hosts")
29 main.step("Checking Hosts reachability by using pingall")
30 result = main.Mininet1.pingall()
31 main.step("Verifying the result")
32 utilities.assert_equals(expect=main.TRUE,actual=result,onpass="All hosts are reacchable",onfail="Hosts are not reachable")
33 main.step("Calling Non Existing API for Experimental Mode")
34 testReturn = main.Mininet1.verify_flow(returns=main.TRUE)
35 utilities.assert_equals(expect=main.TRUE,actual=testReturn,onpass="Host h2 IP address configured",onfail="Host h2 IP address didn't configured")
36