BTBurke / twilio-voice

A Google Voice-like service you can run yourself with Twilio
MIT License
89 stars 8 forks source link

Fix test suite in unconfigured environments #3

Closed ivy closed 7 years ago

ivy commented 7 years ago

In environments where no config variables are set, the test suite fails with:

2017/07/06 18:55:25 Voicemail file not found, falling back to voice prompt
2017/07/06 18:55:25 [set MAILGUN_PUBLIC_KEY, MAILGUN_SECRET_KEY, MAILGUN_DOMAIN environment variables to receive voicemail notifications set NOTIFICATION_EMAIL environment variable to receive voicemail notifications set FORWARDING_NUMBER environment variable to connect your incoming calls to your phone]
exit status 1
FAIL    github.com/BTBurke/twilio-voice 0.012s

This is fixed by moving config validation to main instead of init, allowing the test suite to execute normally.