aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorQuentin <quentin@dufour.io>2024-01-08 10:39:15 +0000
committerQuentin <quentin@dufour.io>2024-01-08 10:39:15 +0000
commit42a54b2c500294c594f3efdd25db28c18f5ac238 (patch)
treee43a11753472f1917ce4aa6ddba24ae3a513bd50 /tests
parent72f9a221ed2318d8ca3452b6574c900be923d3d5 (diff)
parent152d5b7604337fe19a7aea7fc37b3d4615ca7393 (diff)
downloadaerogramme-42a54b2c500294c594f3efdd25db28c18f5ac238.tar.gz
aerogramme-42a54b2c500294c594f3efdd25db28c18f5ac238.zip
Merge branch 'main' into feat/search
Diffstat (limited to 'tests')
-rw-r--r--tests/instrumentation/docker-compose.yml7
-rw-r--r--tests/instrumentation/docker/courier/Dockerfile10
-rwxr-xr-xtests/instrumentation/docker/courier/entrypoint.sh5
-rw-r--r--tests/instrumentation/docker/cyrus/Dockerfile4
-rw-r--r--tests/instrumentation/docker/maddy/Dockerfile2
-rwxr-xr-xtests/instrumentation/docker/maddy/entrypoint.sh4
-rw-r--r--tests/instrumentation/send-to-imap.py8
7 files changed, 35 insertions, 5 deletions
diff --git a/tests/instrumentation/docker-compose.yml b/tests/instrumentation/docker-compose.yml
index 6a112bb..21b5d7c 100644
--- a/tests/instrumentation/docker-compose.yml
+++ b/tests/instrumentation/docker-compose.yml
@@ -20,3 +20,10 @@ services:
- "/dev/log:/dev/log"
ports:
- "143:143/tcp"
+
+ courier:
+ build:
+ context: ./docker/courier/
+ image: courier
+ ports:
+ - "144:143/tcp"
diff --git a/tests/instrumentation/docker/courier/Dockerfile b/tests/instrumentation/docker/courier/Dockerfile
new file mode 100644
index 0000000..08230e7
--- /dev/null
+++ b/tests/instrumentation/docker/courier/Dockerfile
@@ -0,0 +1,10 @@
+FROM debian:sid
+
+RUN apt-get update
+RUN apt-get install -y courier-imap
+RUN useradd -m debian -p '$1$B8Mq5Hki$fg5f4SndVNWsfq.mJiqbI0'
+USER debian
+RUN maildirmake /home/debian/Maildir
+USER root
+COPY ./entrypoint.sh /entrypoint
+ENTRYPOINT ["/entrypoint"]
diff --git a/tests/instrumentation/docker/courier/entrypoint.sh b/tests/instrumentation/docker/courier/entrypoint.sh
new file mode 100755
index 0000000..e95973a
--- /dev/null
+++ b/tests/instrumentation/docker/courier/entrypoint.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+
+/usr/lib/courier/courier-authlib/authdaemond &
+/usr/sbin/couriertcpd -address=0 -maxprocs=40 -maxperip=20 -access=/etc/courier/imapaccess.dat -nodnslookup -noidentlookup 143 /usr/lib/courier/courier/imaplogin /usr/bin/imapd Maildir
diff --git a/tests/instrumentation/docker/cyrus/Dockerfile b/tests/instrumentation/docker/cyrus/Dockerfile
index 67b4e11..54c18a1 100644
--- a/tests/instrumentation/docker/cyrus/Dockerfile
+++ b/tests/instrumentation/docker/cyrus/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian:buster
+FROM debian:sid
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && \
@@ -6,7 +6,7 @@ RUN apt update && \
echo "admins: cyrus" >> /etc/imapd.conf && \
touch /var/lib/cyrus/tls_sessions.db && \
chown cyrus:mail /var/lib/cyrus/tls_sessions.db && \
- mkdir /run/cyrus && \
+ mkdir -p /run/cyrus && \
chown -R cyrus:mail /run/cyrus
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
diff --git a/tests/instrumentation/docker/maddy/Dockerfile b/tests/instrumentation/docker/maddy/Dockerfile
index 341e398..a110e16 100644
--- a/tests/instrumentation/docker/maddy/Dockerfile
+++ b/tests/instrumentation/docker/maddy/Dockerfile
@@ -4,7 +4,7 @@ WORKDIR /root
RUN apt-get update && apt-get install -y openssl && \
openssl req -nodes -new -x509 -subj "/C=DW/ST=Sto/L=Ankh-Morpork /O=Unseen University/OU=Library/CN=Ook/emailAddress=ook@ook.ook" -keyout privkey.pem -out fullchain.pem
-FROM foxcpp/maddy:0.6.2
+FROM foxcpp/maddy:0.7.0
COPY --from=builder /root/privkey.pem /data/tls/privkey.pem
COPY --from=builder /root/fullchain.pem /data/tls/fullchain.pem
diff --git a/tests/instrumentation/docker/maddy/entrypoint.sh b/tests/instrumentation/docker/maddy/entrypoint.sh
index f875624..e42a34a 100755
--- a/tests/instrumentation/docker/maddy/entrypoint.sh
+++ b/tests/instrumentation/docker/maddy/entrypoint.sh
@@ -3,7 +3,7 @@
maddy -config /data/maddy.conf run &
sleep 2
-maddyctl creds create --password pass test@example.com
-maddyctl imap-acct create test@example.com
+maddy creds create --password pass test@example.com
+maddy imap-acct create test@example.com
wait
diff --git a/tests/instrumentation/send-to-imap.py b/tests/instrumentation/send-to-imap.py
index df49076..1f8edae 100644
--- a/tests/instrumentation/send-to-imap.py
+++ b/tests/instrumentation/send-to-imap.py
@@ -51,6 +51,14 @@ parameters = {
"ext": ".cyrus",
"mb": "INBOX."+base_test_mb,
},
+ "courier": {
+ "con": IMAP4,
+ "port": 144,
+ "user": "debian",
+ "pw": "debian",
+ "ext": ".courier",
+ "mb": base_test_mb,
+ },
"stalwart": {
"con": IMAP4_SSL,
"port": 1993,