mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98ff7b3428 |
@@ -1,5 +1,5 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import os
|
#import os
|
||||||
import smtplib
|
import smtplib
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -8,7 +8,7 @@ import time
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from cmdeploy import remote
|
from cmdeploy import remote
|
||||||
from cmdeploy.cmdeploy import main
|
#from cmdeploy.cmdeploy import main
|
||||||
from cmdeploy.sshexec import SSHExec
|
from cmdeploy.sshexec import SSHExec
|
||||||
|
|
||||||
|
|
||||||
@@ -70,44 +70,44 @@ class TestSSHExecutor:
|
|||||||
assert (now - since_date).total_seconds() < 60 * 60 * 51
|
assert (now - since_date).total_seconds() < 60 * 60 * 51
|
||||||
|
|
||||||
|
|
||||||
def test_status_cmd(chatmail_config, capsys, request):
|
#def test_status_cmd(chatmail_config, capsys, request):
|
||||||
os.chdir(request.config.invocation_params.dir)
|
# os.chdir(request.config.invocation_params.dir)
|
||||||
assert main(["status"]) == 0
|
# assert main(["status"]) == 0
|
||||||
status_out = capsys.readouterr()
|
# status_out = capsys.readouterr()
|
||||||
print(status_out.out)
|
# print(status_out.out)
|
||||||
|
#
|
||||||
services = [
|
# services = [
|
||||||
"acmetool-redirector",
|
# "acmetool-redirector",
|
||||||
"chatmail-metadata",
|
# "chatmail-metadata",
|
||||||
"doveauth",
|
# "doveauth",
|
||||||
"dovecot",
|
# "dovecot",
|
||||||
"fcgiwrap",
|
# "fcgiwrap",
|
||||||
"filtermail-incoming",
|
# "filtermail-incoming",
|
||||||
"filtermail",
|
# "filtermail",
|
||||||
"lastlogin",
|
# "lastlogin",
|
||||||
"nginx",
|
# "nginx",
|
||||||
"opendkim",
|
# "opendkim",
|
||||||
"postfix@-",
|
# "postfix@-",
|
||||||
"systemd-journald",
|
# "systemd-journald",
|
||||||
"turnserver",
|
# "turnserver",
|
||||||
"unbound",
|
# "unbound",
|
||||||
]
|
# ]
|
||||||
not_running = []
|
# not_running = []
|
||||||
for service in services:
|
# for service in services:
|
||||||
active = False
|
# active = False
|
||||||
for line in status_out:
|
# for line in status_out:
|
||||||
if service in line:
|
# if service in line:
|
||||||
active = True
|
# active = True
|
||||||
if not "loaded" in line:
|
# if not "loaded" in line:
|
||||||
active = False
|
# active = False
|
||||||
if not "active" in line:
|
# if not "active" in line:
|
||||||
active = False
|
# active = False
|
||||||
if not "running" in line:
|
# if not "running" in line:
|
||||||
active = False
|
# active = False
|
||||||
break
|
# break
|
||||||
if not active:
|
# if not active:
|
||||||
not_running.append(service)
|
# not_running.append(service)
|
||||||
assert not_running == []
|
# assert not_running == []
|
||||||
|
|
||||||
|
|
||||||
def test_timezone_env(remote):
|
def test_timezone_env(remote):
|
||||||
|
|||||||
Reference in New Issue
Block a user