mirror of
https://github.com/chatmail/relay.git
synced 2026-05-14 01:44:38 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c84ddf69e8 | ||
|
|
96fc3d9ff6 | ||
|
|
4b5e8feb96 |
@@ -2,11 +2,15 @@
|
|||||||
|
|
||||||
## untagged
|
## untagged
|
||||||
|
|
||||||
- Add imap_compress option to chatmail.ini (#760)
|
- Add imap_compress option to chatmail.ini
|
||||||
|
([#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,5 +1,4 @@
|
|||||||
import datetime
|
import datetime
|
||||||
#import os
|
|
||||||
import smtplib
|
import smtplib
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -8,7 +7,6 @@ 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
|
||||||
|
|
||||||
|
|
||||||
@@ -70,46 +68,6 @@ 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)
|
||||||
|
|||||||
49
cmdeploy/src/cmdeploy/tests/online/test_3_status.py
Normal file
49
cmdeploy/src/cmdeploy/tests/online/test_3_status.py
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
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