From beda5b39928e60446fc1507a18270814372ed297 Mon Sep 17 00:00:00 2001 From: Nicolas KAROLAK <nicolas@karolak.fr> Date: Tue, 16 Apr 2019 14:59:22 +0200 Subject: [PATCH] handle iburst option --- tests/test_ntp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_ntp.py b/tests/test_ntp.py index 4b34e97f..6a3cacf2 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() -- GitLab