Skip to content
Snippets Groups Projects
Commit 15f37cc2 authored by Brandon Heller's avatar Brandon Heller
Browse files

Add LinearNet test case

parent 7b804ffb
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
from time import sleep
import unittest
from mininet.mininet import init, TreeNet, pingTest, DATAPATHS
from mininet.mininet import init, TreeNet, LinearNet, pingTest, DATAPATHS
class testMinimal(unittest.TestCase):
'''For each datapath type, test ping with a minimal topology.
......@@ -16,7 +16,7 @@ class testMinimal(unittest.TestCase):
'''
def testMinimal(self):
'''Ping test with user-space datapath on minimal topology'''
'''Ping test with both datapaths on minimal topology'''
init()
for datapath in DATAPATHS:
k = datapath == 'kernel'
......@@ -29,7 +29,7 @@ class testTree(unittest.TestCase):
'''For each datapath type, test all-pairs ping with TreeNet.'''
def testTree16(self):
'''Ping test with user-space datapath on minimal topology'''
'''Ping test with both datapaths on 16-host topology'''
init()
for datapath in DATAPATHS:
k = datapath == 'kernel'
......@@ -38,5 +38,18 @@ def testTree16(self):
self.assertEqual(dropped, 0)
class testLinear(unittest.TestCase):
'''For each datapath type, test all-pairs ping with LinearNet.'''
def testLinear10(self):
'''Ping test with both datapaths on 10-switch topology'''
init()
for datapath in DATAPATHS:
k = datapath == 'kernel'
network = network = LinearNet(10, kernel=k)
dropped = network.run(pingTest)
self.assertEqual(dropped, 0)
if __name__ == '__main__':
unittest.main()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment