Skip to content

Commit

Permalink
Fix unittest and watchdog
Browse files Browse the repository at this point in the history
  • Loading branch information
LiaoU3 committed Apr 17, 2024
1 parent 575b4fd commit e4abe67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions providers/base/bin/watchdog_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ def main():
print("watchdog.service unit does not report as active")
watchdog_config_ready = False
if watchdog_config_ready:
print("watchdog.service active")
print("watchdog.service is active")

raise SystemExit(not watchdog_config_ready)
return not watchdog_config_ready


if __name__ == "__main__":
Expand Down
9 changes: 4 additions & 5 deletions providers/base/tests/watchdog_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

from checkbox_support.snap_utils.system import on_ubuntucore
from checkbox_support.snap_utils.system import get_series
from yaml import parse


def watchdog_argparse():
Expand Down Expand Up @@ -96,8 +95,8 @@ def main():
else:
if is_systemd_wdt_configured:
print(
"systemd watchdog should not be enabled but reset timeout: "
"{}".format(runtime_watchdog_usec)
"systemd watchdog should not be enabled but "
"reset timeout: {}".format(runtime_watchdog_usec)
)
watchdog_config_ready = False
if watchdog_config_ready:
Expand All @@ -117,9 +116,9 @@ def main():
print("watchdog.service unit does not report as active")
watchdog_config_ready = False
if watchdog_config_ready:
print("watchdog.service active")
print("watchdog.service is active")

raise SystemExit(not watchdog_config_ready)
return not watchdog_config_ready


if __name__ == "__main__":
Expand Down

0 comments on commit e4abe67

Please sign in to comment.