Commit e6189ad3 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

Fix ping test: ping is now capable of understanding IPv6 addresses

Starting from Debian 9, ping binary can understand IPv6 addresses and
since we have more and more testnode on Debian9, test the other way
around. Maybe we should get rid of this test...
parent 33722a40
......@@ -41,18 +41,18 @@ class TestIsICMPPacketLost(unittest.TestCase):
result = test("couscous", True, 5)
self.assertEqual(result[4], -1)
def test_localhost6 (self):
def test_localhost6_with_ping6 (self):
result = test("::1", False, 5)
self.assertEqual(result[4], '0')
def test_localhost6_with_ping4 (self):
result = test("::1", True, 5)
self.assertEqual(result[4], '0')
def test_error6(self):
result = test("couscous", False, 5)
self.assertEqual(result[4], -1)
def test_error_4_6(self):
result = test("::1", True, 5)
self.assertEqual(result[4], -1)
if __name__ == '__main__':
unittest.main()
  • Maybe we should get rid of this test...

    I don't know exactly what this test covers, but I think we can assume system ping command works and we cannot assume anything about the network.

    I feel this test could mock ping command, maybe by using a shell script that would produce the expected output.

    @rafael or @alain.takoudjou know this test better.

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment