diff --git a/cloudmesh/common/Host.py b/cloudmesh/common/Host.py index 9e5b1076..76fbf91a 100644 --- a/cloudmesh/common/Host.py +++ b/cloudmesh/common/Host.py @@ -328,17 +328,15 @@ def _ping(args): count = str(args['count']) count_flag = '-n' if os_is_windows() else '-c' - # if os_is_windows(): + if os_is_windows(): # adding ipv4 enforce for windows # for some reason -4 is required or hosts # fail. we need ipv4 - # command = ['ping', '-4', ip, count_flag, count] - # else: - # command = ['ping', count_flag, count, ip] - command = ['ping', '-4', ip, count_flag, count] + command = ['ping', '-4', ip, count_flag, count] + else: + command = ['ping', count_flag, count, ip] + # command = ['ping', '-4', ip, count_flag, count] result = subprocess.run(command, capture_output=True) - print(result) - print('THAT WAS RESULT!!!') try: timers = result.stdout \ .decode("utf-8", "ignore") \ diff --git a/tests/test_ping.py b/tests/test_ping.py index 5401312d..912eae9f 100644 --- a/tests/test_ping.py +++ b/tests/test_ping.py @@ -17,6 +17,10 @@ cloud = "local" +# https://github.com/actions/runner-images/issues/1519 ping does not work in github runner so we skip it. +import os +github_action = os.getenv('GITHUB_ACTIONS') + # multiping only works if you have root, so we can not use it # from multiping import MultiPing @@ -33,6 +37,7 @@ @pytest.mark.incremental +@pytest.mark.skipif(github_action, reason='GitHub Runner uses Azure and Azure disables ping. :( Too bad!') class Test_ping: def ping(self, processors=1):