Skip to content

Commit

Permalink
Added setup commands for Chrony test on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
r-dailey committed Dec 31, 2024
1 parent c3f2eeb commit 1c01feb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions microsoft/testsuites/core/timesync.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,11 @@ def verify_timesync_ntp(self, node: Node) -> None:
priority=2,
)
def verify_timesync_chrony(self, node: Node) -> None:
# On FreeBSD images, Chrony is not enabled by default after installation.
# To enabled it the line chronyd_enable=YES must be added to /etc/rc.conf.
if isinstance(node.os, BSD):
node.execute("chmod +x /etc/rc.conf", sudo=True)
node.execute("bash -c 'echo chronyd_enable=YES >> /etc/rc.conf'", sudo=True)
chrony = node.tools[Chrony]
# 1. Restart chrony service.
chrony.restart()
Expand Down

0 comments on commit 1c01feb

Please sign in to comment.