mirror of
https://github.com/chatmail/relay.git
synced 2026-05-14 09:54:38 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98ff7b3428 |
@@ -2,15 +2,11 @@
|
|||||||
|
|
||||||
## untagged
|
## untagged
|
||||||
|
|
||||||
- Add imap_compress option to chatmail.ini
|
- Add imap_compress option to chatmail.ini (#760)
|
||||||
([#760](https://github.com/chatmail/relay/pull/760))
|
|
||||||
|
|
||||||
- Remove echobot from relays
|
- Remove echobot from relays
|
||||||
([#753](https://github.com/chatmail/relay/pull/753))
|
([#753](https://github.com/chatmail/relay/pull/753))
|
||||||
|
|
||||||
- Fix `cmdeploy webdev`
|
|
||||||
([#743](https://github.com/chatmail/relay/pull/743))
|
|
||||||
|
|
||||||
- Add robots.txt to exclude all web crawlers
|
- Add robots.txt to exclude all web crawlers
|
||||||
([#732](https://github.com/chatmail/relay/pull/732))
|
([#732](https://github.com/chatmail/relay/pull/732))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import datetime
|
import datetime
|
||||||
|
#import os
|
||||||
import smtplib
|
import smtplib
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -7,6 +8,7 @@ import time
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from cmdeploy import remote
|
from cmdeploy import remote
|
||||||
|
#from cmdeploy.cmdeploy import main
|
||||||
from cmdeploy.sshexec import SSHExec
|
from cmdeploy.sshexec import SSHExec
|
||||||
|
|
||||||
|
|
||||||
@@ -68,6 +70,46 @@ 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):
|
||||||
|
# os.chdir(request.config.invocation_params.dir)
|
||||||
|
# assert main(["status"]) == 0
|
||||||
|
# status_out = capsys.readouterr()
|
||||||
|
# print(status_out.out)
|
||||||
|
#
|
||||||
|
# services = [
|
||||||
|
# "acmetool-redirector",
|
||||||
|
# "chatmail-metadata",
|
||||||
|
# "doveauth",
|
||||||
|
# "dovecot",
|
||||||
|
# "fcgiwrap",
|
||||||
|
# "filtermail-incoming",
|
||||||
|
# "filtermail",
|
||||||
|
# "lastlogin",
|
||||||
|
# "nginx",
|
||||||
|
# "opendkim",
|
||||||
|
# "postfix@-",
|
||||||
|
# "systemd-journald",
|
||||||
|
# "turnserver",
|
||||||
|
# "unbound",
|
||||||
|
# ]
|
||||||
|
# not_running = []
|
||||||
|
# for service in services:
|
||||||
|
# active = False
|
||||||
|
# for line in status_out:
|
||||||
|
# if service in line:
|
||||||
|
# active = True
|
||||||
|
# if not "loaded" in line:
|
||||||
|
# active = False
|
||||||
|
# if not "active" in line:
|
||||||
|
# active = False
|
||||||
|
# if not "running" in line:
|
||||||
|
# active = False
|
||||||
|
# break
|
||||||
|
# if not active:
|
||||||
|
# not_running.append(service)
|
||||||
|
# assert not_running == []
|
||||||
|
|
||||||
|
|
||||||
def test_timezone_env(remote):
|
def test_timezone_env(remote):
|
||||||
for line in remote.iter_output("env"):
|
for line in remote.iter_output("env"):
|
||||||
print(line)
|
print(line)
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
from cmdeploy.cmdeploy import main
|
|
||||||
|
|
||||||
|
|
||||||
def test_status_cmd(chatmail_config, capsys, request):
|
|
||||||
os.chdir(request.config.invocation_params.dir)
|
|
||||||
assert main(["status"]) == 0
|
|
||||||
status_out = capsys.readouterr()
|
|
||||||
print(status_out.out)
|
|
||||||
|
|
||||||
assert len(status_out.out.splitlines()) > 5
|
|
||||||
|
|
||||||
"""
|
|
||||||
don't test actual server state:
|
|
||||||
|
|
||||||
services = [
|
|
||||||
"acmetool-redirector",
|
|
||||||
"chatmail-metadata",
|
|
||||||
"doveauth",
|
|
||||||
"dovecot",
|
|
||||||
"fcgiwrap",
|
|
||||||
"filtermail-incoming",
|
|
||||||
"filtermail",
|
|
||||||
"lastlogin",
|
|
||||||
"nginx",
|
|
||||||
"opendkim",
|
|
||||||
"postfix@-",
|
|
||||||
"systemd-journald",
|
|
||||||
"turnserver",
|
|
||||||
"unbound",
|
|
||||||
]
|
|
||||||
not_running = []
|
|
||||||
for service in services:
|
|
||||||
active = False
|
|
||||||
for line in status_out:
|
|
||||||
if service in line:
|
|
||||||
active = True
|
|
||||||
if not "loaded" in line:
|
|
||||||
active = False
|
|
||||||
if not "active" in line:
|
|
||||||
active = False
|
|
||||||
if not "running" in line:
|
|
||||||
active = False
|
|
||||||
break
|
|
||||||
if not active:
|
|
||||||
not_running.append(service)
|
|
||||||
assert not_running == []
|
|
||||||
"""
|
|
||||||
Reference in New Issue
Block a user