Dan Kenigsberg has posted comments on this change.
Change subject: Functional Tests [3/3]: Added static source routing functional test ......................................................................
Patch Set 5: Code-Review-1
(2 comments)
.................................................... File tests/functional/networkTests.py Line 1047: rules = [Rule(source=IP_NETWORK_AND_CIDR, table=IP_TABLE), Line 1048: Rule(destination=IP_NETWORK_AND_CIDR, table=IP_TABLE, Line 1049: srcDevice=deviceName)] Line 1050: Line 1051: for route in routes: I think that testing for
set(routes).issubset(ipwrapper.valudRoutes())
would be quicker and cleaner. But I can live with the current code. Line 1052: self.assertTrue(routeExists(route)) Line 1053: for rule in rules: Line 1054: self.assertTrue(ruleExists(rule)) Line 1055:
Line 1058: {}, {'connectivityCheck': False}) Line 1059: self.assertEqual(status, SUCCESS, msg) Line 1060: Line 1061: # Assert that routes and rules don't exist Line 1062: for route in routes: here you actually test that
set(routes).isdisjoint(ipwrapper.validRoutes()) Line 1063: self.assertFalse(routeExists(route)) Line 1064: for rule in rules: