mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add a test for service_log
This commit is contained in:
parent
afbeb145b6
commit
b6631b4882
1 changed files with 9 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
|||
import os
|
||||
|
||||
from conftest import message, raiseYunohostError
|
||||
from conftest import raiseYunohostError
|
||||
|
||||
from yunohost.service import _get_services, _save_services, service_status, service_add, service_remove
|
||||
from yunohost.service import _get_services, _save_services, service_status, service_add, service_remove, service_log
|
||||
|
||||
|
||||
def setup_function(function):
|
||||
|
@ -42,6 +42,13 @@ def test_service_status_single():
|
|||
assert status["status"] == "running"
|
||||
|
||||
|
||||
def test_service_log():
|
||||
|
||||
logs = service_log("ssh")
|
||||
assert "journalctl" in logs.keys()
|
||||
assert "/var/log/auth.log" in logs.keys()
|
||||
|
||||
|
||||
def test_service_status_unknown_service(mocker):
|
||||
|
||||
with raiseYunohostError(mocker, 'service_unknown'):
|
||||
|
|
Loading…
Add table
Reference in a new issue