From d730af2e69177da06553d9bd5e4eaaa967d97d10 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sun, 10 Dec 2023 11:59:45 +0100 Subject: [PATCH] cleanup --- .../src/deploy_chatmail/cmdeploy.py | 2 +- scripts/measure_tls_and_logins.py | 28 ------------------- scripts/remote-deploy.sh | 8 ------ 3 files changed, 1 insertion(+), 37 deletions(-) delete mode 100755 scripts/measure_tls_and_logins.py delete mode 100755 scripts/remote-deploy.sh diff --git a/deploy-chatmail/src/deploy_chatmail/cmdeploy.py b/deploy-chatmail/src/deploy_chatmail/cmdeploy.py index 2f4417ab..5095f69c 100644 --- a/deploy-chatmail/src/deploy_chatmail/cmdeploy.py +++ b/deploy-chatmail/src/deploy_chatmail/cmdeploy.py @@ -121,7 +121,7 @@ def webdev_cmd(args, out, config): def test_cmd(args, out, config): - """run Run web development loop for static local web pages.""" + """Run local and online tests.""" tox = shutil.which("tox") subprocess.check_call([tox, "-c", "chatmaild"]) diff --git a/scripts/measure_tls_and_logins.py b/scripts/measure_tls_and_logins.py deleted file mode 100755 index fc0b6d1c..00000000 --- a/scripts/measure_tls_and_logins.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 -import os -import time -import imaplib - -domain = os.environ.get("CHATMAIL_DOMAIN", "c3.testrun.org") - -NUM_CONNECTIONS=10 - -conns = [] - -start = time.time() -for i in range(NUM_CONNECTIONS): - print(f"opening connection {i} to {domain}") - conn = imaplib.IMAP4_SSL(domain) - conns.append(conn) - -tlsdone = time.time() -duration = tlsdone-start -print(f"{duration}: TLS connections opening TLS connections") - -for i, conn in enumerate(conns): - print(f"logging into connection {i}") - conn.login(f"measure{i}", "pass") - -logindone = time.time() -duration = logindone - tlsdone -print(f"{duration}: LOGINS done") diff --git a/scripts/remote-deploy.sh b/scripts/remote-deploy.sh deleted file mode 100755 index 4a80cdca..00000000 --- a/scripts/remote-deploy.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e - -: ${CHATMAIL_DOMAIN:=c1.testrun.org} -: ${CHATMAIL_SSH:=$CHATMAIL_DOMAIN} - -rsync -avz . "root@$CHATMAIL_SSH:/root/chatmail" --exclude='/.git' --filter="dir-merge,- .gitignore" -ssh "root@$CHATMAIL_SSH" "cd /root/chatmail; apt install -y python3-venv; python3 -m venv venv; venv/bin/pip install pyinfra build; venv/bin/python3 -m build -n --sdist chatmaild --outdir dist; venv/bin/pip install -e ./deploy-chatmail -e ./chatmaild; export CHATMAIL_DOMAIN=$CHATMAIL_DOMAIN; venv/bin/pyinfra @local deploy.py"