Advertisement
andrewbogott

Untitled

Jul 3rd, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. diff --git a/nova/tests/network/test_linux_net.py b/nova/tests/network/test_linux_net.py
  2. index bd00be2..23bd2b6 100644
  3. --- a/nova/tests/network/test_linux_net.py
  4. +++ b/nova/tests/network/test_linux_net.py
  5. @@ -521,19 +521,23 @@ class LinuxNetworkTestCase(test.TestCase):
  6. self.flags(bgp_peer_as='56000')
  7.  
  8. expected = '''neighbor 192.168.1.1 {
  9. - router-id 192.168.1.3;
  10. - local-address 192.168.1.3;
  11. + router-id %s;
  12. + local-address %s;
  13. local-as 56000;
  14. peer-as 56000;
  15. graceful-restart;
  16. static {
  17. - route 10.0.0.1/32 next-hop 192.168.1.3;
  18. - route 10.0.0.2/32 next-hop 192.168.1.3;
  19. + route 10.0.0.1/32 next-hop %s;
  20. + route 10.0.0.2/32 next-hop %s;
  21. }
  22. -}'''
  23. +}
  24. +''' % (FLAGS.my_ip, FLAGS.my_ip, FLAGS.my_ip, FLAGS.my_ip)
  25. + self.stubs.Set(db, 'floating_ip_get_all_by_host', fake1)
  26. actual_routes = self.driver.get_bgp_routes(self.context)
  27.  
  28. - self.stubs.Set(db, 'floating_ip_get_all_by_host', fake1)
  29. + print "expected: %s" % expected
  30. + print "actual: %s" % actual_routes
  31. +
  32. self.assertEquals(actual_routes, expected)
  33.  
  34. def test_get_bgp_routes_multiple_peers(self):
  35. @@ -566,7 +570,7 @@ neighbor 192.168.1.2 {
  36. route 10.0.0.2/32 next-hop 192.168.1.3;
  37. }
  38. }'''
  39. + self.stubs.Set(db, 'floating_ip_get_all_by_host', fake1)
  40. actual_routes = self.driver.get_bgp_routes(self.context)
  41.  
  42. - self.stubs.Set(db, 'floating_ip_get_all_by_host', fake1)
  43. self.assertEquals(actual_routes, expected)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement