Closed katefike closed 4 months ago
=============================================== ERRORS ================================================
______________________ ERROR collecting tests/test_parsers/test_email_parser.py _______________________
tests/test_parsers/test_email_parser.py:182: in <module>
DATA = get_test_data()
tests/test_parsers/test_email_parser.py:166: in get_test_data
msgs = utils.get_inbox_emails(uid)
tests/utils.py:50: in get_inbox_emails
with imap_tools.MailBoxUnencrypted(ENV["IMAP4_FQDN"]).login(
.venv/lib/python3.10/site-packages/imap_tools/mailbox.py:68: in login
self.folder.set(initial_folder)
.venv/lib/python3.10/site-packages/imap_tools/folder.py:44: in set
check_command_status(result, MailboxFolderSelectError)
.venv/lib/python3.10/site-packages/imap_tools/utils.py:46: in check_command_status
raise exception(command_result=command_result, expected=expected)
E imap_tools.errors.MailboxFolderSelectError: Response status "OK" expected, but "NO" received. Data: [b'[SERVERBUG] Internal error occurred. Refer to server log for more information. [2024-05-20 22:32:12] (0.001 + 0.000 secs).']
------------------------------------------- Captured stdout -------------------------------------------
Recreated Maildir/.
Successfully loaded emails from mbox file.
------------------------------------------- Captured stderr -------------------------------------------
mkdir: cannot create directory ‘/home/kfike/Maildir/’: File exists
Fatal: Source is not an mbox file or a directory!
chmod: cannot access '/home/kfike/Maildir/': No such file or directory
======================================= short test summary info =======================================
ERROR tests/test_parsers/test_email_parser.py - imap_tools.errors.MailboxFolderSelectError: Response status "OK" expected, but "NO" received. Data...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================== 1 error in 0.35s ===========================================
Double check that the .mbox files exist in docker/mailserver/test_data/example_data
TESTING
Dev
Remove containers and images:
docker rm -vf $(docker ps -aq) && docker rmi -f $(docker images -aq)
Delete DB volume and remake it:
docker compose -f docker-compose.dev.yml up --build
pytest -xv
Prod
Turn off the droplet.
Detach the two volumes from the original droplet.
Detach the reserved IP from the original droplet.
Take a final snapshot of the original droplet: prod-24041801-test-deletion
Delete the droplet and the firewall.
Create a new droplet. Run
bash setup/2_create_prod_server.sh
Note that two reserved IPs will be created. Unassign and delete the new one.
Assign the existing reserved IP to the new droplet.
Attach the volumes to the new droplet.
Ensure the the local .env has the correct values for prod
Run
bash setup/3_configure_prod_server.sh
SSH to the host and run commands to mount the volumes: https://github.com/katefike/sage/issues/129#issuecomment-2106276472
Send a test email.
python3 scripts/get_all_emails.py
✔️Run sage.
python3 -m sage
✔️