Skip to content
Snippets Groups Projects
Commit 29e5bee3 authored by Cody Burkard's avatar Cody Burkard
Browse files

fixed issue with AssertTrue and skip first test if using old OVS version

parent de41192e
No related branches found
No related tags found
No related merge requests found
......@@ -7,10 +7,11 @@
import unittest
import pexpect
from collections import defaultdict
from mininet.node import OVSSwitch
class testNumberedports( unittest.TestCase ):
@unittest.skipIf( OVSSwitch.setup() or OVSSwitch.isOldOVS(), "old version of OVS" )
def testConsistency( self ):
"""verify consistency between mininet and ovs ports"""
p = pexpect.spawn( 'python -m mininet.examples.numberedports' )
......@@ -28,7 +29,7 @@ def testConsistency( self ):
elif index == 2:
self.assertNotEqual( 0, count )
break
self.assertTrue( correct_ports )
self.assertTrue( correct_ports )
def testNumbering( self ):
"""verify that all of the port numbers are printed correctly and consistent with their interface"""
......@@ -44,8 +45,8 @@ def testNumbering( self ):
ofport = p.match.group( 2 )
self.assertEqual( intfport, ofport )
elif index == 1:
self.assertNotEqual( 0, count_intfs )
break
self.assertNotEqual( 0, count_intfs )
if __name__ == '__main__':
unittest.main()
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