mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Complain about using --line_match=Started/Stopped which is irrelevant/counterproductive
This commit is contained in:
parent
a8e5c7e67e
commit
c989679ba3
1 changed files with 8 additions and 0 deletions
|
@ -2548,6 +2548,14 @@ class Script(TestSuite):
|
|||
"Please do not use 'systemctl start' to start services. Instead, you should use 'ynh_systemd_action' which will display the service log in case it fails to start. You can also use '--line_match' to wait until some specific word appear in the log, signaling the service indeed fully started."
|
||||
)
|
||||
|
||||
@test()
|
||||
def bad_line_match(self):
|
||||
|
||||
if self.containsregex(r'--line_match=Started$') or self.containsregex(r'--line_match=Stopped$'):
|
||||
yield Warning(
|
||||
'Using --line_match="Started" or "Stopped" in ynh_systemd_action is counter productive because it will match the systemd message and not the actual app message ... Please check the log of the service to find an actual, relevant message to match, or remove the --line_match option entirely'
|
||||
)
|
||||
|
||||
@test()
|
||||
def quiet_systemctl_enable(self):
|
||||
|
||||
|
|
Loading…
Reference in a new issue