diff --git a/tests/network/common.py b/tests/network/common.py index 6cdd8f0ef9ff43156ac2dfb3edb3e5e27803f60f..0f7ce8e7dcdb6df006e29f19c5f0114406a3eb71 100644 --- a/tests/network/common.py +++ b/tests/network/common.py @@ -5,30 +5,33 @@ These are implementation of tests that are run in environments environments and import pytest # pylint: disable=no-self-use + class InternetTests: """Tests for checking if connection to Internet is appropriate. """ @pytest.mark.parametrize("server", [ "172.16.1.1", # ISP gateway - "217.31.205.50" # nic.cz + "217.31.205.50", # nic.cz + "nic.cz", + "turris.cz", + "google.com" ]) def test_ping(self, board_shell, server): - """Ping various IPv4 addresses. - - We send only one ICMP packet to not flood. - """ - board_shell.run("ping -c 1 '{}'".format(server)) + """Ping various IPv4 servers. - @pytest.mark.parametrize("server", ["nic.cz", "turris.cz", "google.com"]) - def test_ping_name(self, board_shell, server): - """Ping various IPv4 address using DNS record. + We send only one ICMP packet to not flood and to be quickly done with it (the success takes less than second) """ board_shell.run("ping -c 1 '{}'".format(server)) - @pytest.mark.parametrize("server", ["nic.cz", "turris.cz", "google.com"]) + @pytest.mark.parametrize("server", [ + "nic.cz", + "turris.cz", + "google.com" + ]) def test_dns(self, board_shell, server): """Try to resolve verious domain names. """ board_shell.run("nslookup '{}'".format(server)) -# TODO more excessive DNS testing + + # TODO more excessive DNS testing