Skip to content

Commit

Permalink
Skip test_clock if ntp_server is not provided (sonic-net#13046)
Browse files Browse the repository at this point in the history
  • Loading branch information
bingwang-ms authored Jun 2, 2024
1 parent 938e5bf commit e697f2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/clock/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def pytest_addoption(parser):
parser.addoption("--ntp_server", action="store", default=None, required=True, help="IP of NTP server to use")
parser.addoption("--ntp_server", action="store", default=None, required=False, help="IP of NTP server to use")


@pytest.fixture(scope='session', autouse=True)
Expand All @@ -18,7 +18,7 @@ def ntp_server(request):
ntp_server_ip = request.config.getoption("ntp_server")
logging.info(f'NTP server ip from execution parameter: {ntp_server_ip}')
if ntp_server_ip is None:
pytest.fail("IP of NTP server was not given")
pytest.skip("IP of NTP server was not given")
return ntp_server_ip


Expand Down

0 comments on commit e697f2f

Please sign in to comment.