Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Travis-CI does not work with SMPT server #122

Closed
jakepeyser opened this issue Jul 3, 2016 · 1 comment
Closed

Travis-CI does not work with SMPT server #122

jakepeyser opened this issue Jul 3, 2016 · 1 comment

Comments

@jakepeyser
Copy link
Contributor

When running the server/tests/test_messaging_service.py test script in Travis-CI, it fails with the following output:

======================================================================
ERROR: test_send_email_success (__main__.SendEmailTestCase)
Does the send_email function return successfully?
----------------------------------------------------------------------
Traceback (most recent call last):
  File "server/tests/test_messaging_service.py", line 49, in test_send_email_success
    self.assertIsNone(messaging_service.send_email(test_email, subject, message, 'html'))
  File "/home/travis/build/IBM-Bluemix/logistics-wizard/server/services/messaging.py", line 75, in send_email
    server.ehlo()
  File "/opt/python/2.7.9/lib/python2.7/smtplib.py", line 413, in ehlo
    self.putcmd(self.ehlo_msg, name or self.local_hostname)
  File "/opt/python/2.7.9/lib/python2.7/smtplib.py", line 341, in putcmd
    self.send(str)
  File "/opt/python/2.7.9/lib/python2.7/smtplib.py", line 333, in send
    raise SMTPServerDisconnected('please run connect() first')
SMTPServerDisconnected: please run connect() first

We need to determine what is causing this failure and create a workaround so Travis can test the email sending successfully.

@jakepeyser
Copy link
Contributor Author

Turns out there was leading white-space on the SMTP_SERVER env var, causing this issue:

$ export SMTP_SERVER= smtp.gmail.com
/home/travis/build.sh: line 45: export: `smtp.gmail.com': not a valid identifier

For context, this is apparently a larger Travis-CI issue that is still currently open. Removed white-space in 822e08e and problem has been fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant