Skip to content

Commit 32fd488

Browse files
committed
tests fix checkpoint.
1 parent 3853314 commit 32fd488

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

ci/certbot/compose.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ services:
1515
- ./ci/certbot/post-setup.d/:/data/post-setup.d/
1616
extra_hosts:
1717
- "zulip.example.net:172.28.5.100"
18+
# We override the port mapping, because port 25 is not available in CI.
19+
ports: !override
20+
- "2525:25"
21+
- "80:80"
22+
- "443:443"
1823

1924
database:
2025
networks: [zulip-backend]

ci/certbot/test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ if [ "${success}" = "0" ]; then
3636
fi
3737

3838
## SMTP also has the same cert
39-
echo | openssl s_client -showcerts -servername zulip.example.net -connect localhost:25 -starttls smtp \
39+
echo "EHLO localhost" | nc localhost 2525
40+
echo | openssl s_client -showcerts -servername zulip.example.net -connect localhost:2525 -starttls smtp \
4041
| openssl x509 -text -noout \
4142
| tee cert.pem
4243
if ! grep -E "Issuer: CN\s*=\s*Pebble Intermediate CA" cert.pem; then
@@ -47,14 +48,15 @@ fi
4748
## Test renewing -- this should generate and deploy a new certificate
4849
serial=$(grep "Serial Number:" cert.pem)
4950
"${docker[@]:?}" exec zulip /usr/bin/certbot renew --force-renew --non-interactive --debug
51+
"${docker[@]:?}" exec zulip cat /var/log/letsencrypt/letsencrypt.log
5052
getcert | tee cert.pem
5153
newserial=$(grep "Serial Number:" cert.pem)
5254
if [ "${newserial}" = "${serial}" ]; then
5355
echo "Failed to renew -- same serial number?"
5456
exit 1
5557
fi
5658

57-
echo | openssl s_client -showcerts -servername zulip.example.net -connect localhost:25 -starttls smtp \
59+
echo | openssl s_client -showcerts -servername zulip.example.net -connect localhost:2525 -starttls smtp \
5860
| openssl x509 -text -noout \
5961
| tee cert.pem
6062
smtpserial=$(grep "Serial Number:" cert.pem)

0 commit comments

Comments
 (0)