]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: extend 008-confload test
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 6 Aug 2024 08:45:55 +0000 (10:45 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 6 Aug 2024 09:27:13 +0000 (11:27 +0200)
test/system/008-confload

index 7e806988b71eebf2d899115c6068631e4d7475c1..b978c190e177f291d3696e07b5d4c440433a91f6 100755 (executable)
@@ -77,7 +77,32 @@ check_chronyc_output "^[^=]*
 .. 127\.123\.5\.3 *[05]   7 [^^]*
 .. 127\.123\.5\.6 [^^]*$" || test_fail
 
+run_chronyc "reload sources" || test_fail
+run_chronyc "reload sources" || test_fail
+
+rm $TEST_DIR/conf5.d/{3,5,6}.sources
+echo "server 127.123.5.7" > $TEST_DIR/conf5.d/7.sources
+
+run_chronyc "reload sources" || test_fail
+
+run_chronyc "sources" || test_fail
+check_chronyc_output "^[^=]*
+=*
+.. 127\.123\.1\.1 [^^]*
+.. 127\.123\.1\.3 [^^]*
+.. 127\.123\.1\.4 [^^]*
+.. 127\.123\.3\.1 [^^]*
+.. 127\.123\.2\.2 [^^]*
+.. 127\.123\.2\.3 [^^]*
+.. 127\.123\.4\.4 [^^]*
+.. 127\.123\.1\.2 *[05]   6 [^^]*
+.. 127\.123\.5\.2 *[05]   5 [^^]*
+.. 127\.123\.5\.7 [^^]*$" || test_fail
+
+run_chronyc "reload sources" || test_fail
+
 stop_chronyd || test_fail
-check_chronyd_message_count "Could not add source" 1 1 || test_fail
+check_chronyd_message_count "Could not add source.*\.5\.5.*in use" 3 3 || test_fail
+check_chronyd_message_count "Could not add source" 3 3 || test_fail
 
 test_pass