Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci-no-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ concurrency:
jobs:
no-dns:
name: LXC deploy and test
uses: chatmail/cmlxc/.github/workflows/lxc-test.yml@v0.14.6
uses: chatmail/cmlxc/.github/workflows/lxc-test.yml@6d64dff5cf1ad3ccd37f7b51ee0a96bbdc9c84d2
with:
cmlxc_version: v0.14.6
cmlxc_version: 6d64dff5cf1ad3ccd37f7b51ee0a96bbdc9c84d2
cmlxc_commands: |
cmlxc init
# single cmdeploy relay test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ jobs:

lxc-test:
name: LXC deploy and test
uses: chatmail/cmlxc/.github/workflows/lxc-test.yml@v0.14.6
uses: chatmail/cmlxc/.github/workflows/lxc-test.yml@6d64dff5cf1ad3ccd37f7b51ee0a96bbdc9c84d2
with:
cmlxc_version: v0.14.6
cmlxc_version: 6d64dff5cf1ad3ccd37f7b51ee0a96bbdc9c84d2
cmlxc_commands: |
cmlxc init
# single cmdeploy relay test
Expand Down
21 changes: 16 additions & 5 deletions cmdeploy/src/cmdeploy/tests/online/test_2_deltachat.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,32 @@ def test_read_receipts_between_instances(self, cmfactory, lp, maildomain2):
assert "error" not in m.get_info()
time.sleep(1)


def test_hide_senders_ip_address(cmfactory, ssl_context):
public_ip = requests.get("http://icanhazip.com").content.decode().strip()
assert ipaddress.ip_address(public_ip)

user1, user2 = cmfactory.get_online_accounts(2)
user1.set_config("bcc_self", "1")
chat = cmfactory.get_accepted_chat(user1, user2)

chat.send_text("testing submission header cleanup")
user2.wait_for_incoming_msg()
addr = user2.get_config("addr")

addr = user1.get_config("addr")
host = addr.split("@")[1].strip("[").strip("]")
pw = user2.get_config("mail_pw")
pw = user1.get_config("mail_pw")
mailbox = imap_tools.MailBox(host, ssl_context=ssl_context)
mailbox.login(addr, pw)
msgs = list(mailbox.fetch(mark_seen=False))

deadline = time.time() + 10
msgs = []

while time.time() < deadline:
mailbox.folder.set("INBOX")
msgs = list(mailbox.fetch(criteria="ALL", mark_seen=False))
if msgs:
break
time.sleep(0.5)

assert msgs, "expected at least one message"
assert public_ip not in msgs[0].obj.as_string()
assert public_ip not in msgs[-1].obj.as_string()
6 changes: 3 additions & 3 deletions cmdeploy/src/cmdeploy/tests/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ def get_online_accounts(self, num, domain=None):
)
futures.append(future)

# ensure messages stay in INBOX so that they can be
# concurrently fetched via extra IMAP connections during tests
account.set_config("delete_server_after", "10")
# # ensure messages stay in INBOX so that they can be
# # concurrently fetched via extra IMAP connections during tests
# account.set_config("delete_server_after", "10")
accounts.append(account)

for future in futures:
Expand Down