mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-05 20:47:55 +00:00
124e2782db
The NTP backend selector was well covered and nothing connected it to makentp: copying the base makentp.pm over the head one left the whole unit suite byte-identical, so the branches that consume choose()'s answer -- abort on a selector error, warn on a downgrade, abort when neither daemon is installed -- and the --backend argument handed to setupntp were covered by nothing. They were unreachable from a test because they sat inside process_request, which needs a management node. Move the decisions into ntp_backend_action() and setupntp_command(), which take their inputs and return an answer; the caller keeps send_msg and runcmd. No behaviour changes -- the same messages are sent on the same conditions, and the same command is built. Verified by mutation rather than by reading: dropping the install abort reds 3 of 15, the downgrade note 1, the --backend argument 2, the server-list split 1, and the selector-error abort 2. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>