diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 12:48:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 12:48:03 +0000 |
commit | 6d46de912288f0875f0e3cca27b8d7455fa07b42 (patch) | |
tree | b2ee235051d590490c0fdccbf0241b3706e292e7 /debian/tests/dynamically-add-source | |
parent | Adding upstream version 4.5. (diff) | |
download | chrony-6d46de912288f0875f0e3cca27b8d7455fa07b42.tar.xz chrony-6d46de912288f0875f0e3cca27b8d7455fa07b42.zip |
Adding debian version 4.5-1.debian/4.5-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/dynamically-add-source')
-rw-r--r-- | debian/tests/dynamically-add-source | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/tests/dynamically-add-source b/debian/tests/dynamically-add-source new file mode 100644 index 0000000..1e4c160 --- /dev/null +++ b/debian/tests/dynamically-add-source @@ -0,0 +1,27 @@ +#!/bin/sh +# Make sure that NTP sources from /etc/chrony/sources.d are usable. + +set -e + +. debian/tests/helper-functions + +server_addr="192.0.2.1" + +printf "Preparing chronyd configuration: " +__no_system_clock_control +__restart_chronyd && __test_ok || __test_skip + +printf "Adding a dummy server to the list of NTP sources: " +printf "server $server_addr\n" > /etc/chrony/sources.d/dummy-server.sources && __test_ok || __test_fail + +printf "Reloading NTP sources: " +__reload_sources + +printf "Checking for dummy server availability: " +__check_sources "$server_addr" + +printf "Checking for dummy server availability after restarting chronyd: " +__restart_chronyd +__check_sources "$server_addr" + +exit 0 |