diff --git a/tests/test_ntp.py b/tests/test_ntp.py index 4b34e97ffb6c72bb061b7cbb41e5757cf81623b4..6a3cacf25bfee93986c38fad48207a80dc0b30f9 100755 --- a/tests/test_ntp.py +++ b/tests/test_ntp.py @@ -21,7 +21,7 @@ if os.path.isfile('/usr/bin/ntpq'): cmd = 'LANG=C ntpq -pd' expected = 'remote' ntpconf = '/etc/ntp.conf' - ntpconf_expected = r'^(?:server|pool)\s(.*)$' + ntpconf_expected = r'^(?:server|pool)\s([a-zA-Z0-9\._-]+)(?:\s*iburst)?$' else: cmd = 'LANG=C timedatectl' expected = 'NTP synchronized' @@ -52,7 +52,7 @@ if not expected_servers: if 'Ubuntu' in subprocess.getoutput('lsb_release -a'): expected_servers = ['ntp.ubuntu.com'] else: - expected_servers = ['0.debian.pool.ntp.org iburst'] + expected_servers = ['0.debian.pool.ntp.org'] with open(ntpconf, 'r') as f: content = f.read()