robertmrk / aiosfstream

Salesforce Streaming API client for asyncio
MIT License
47 stars 31 forks source link

Adding support for custom domains #12

Open whitespaceninja opened 4 years ago

whitespaceninja commented 4 years ago

I've been seeing errors when connecting to Salesforce for 'client identifier invalid'. The errors happen sporadically, so it's not something on our end, it's Salesforce. I found some posts that recommend using your domain instead of 'login.salesforce.com'. I updated the repo to allow that.

In addition, for some salesforce instances like Gov Cloud instances, you can't actually login with 'login.salesforce.com', you HAVE to use the custom domain. This allows support for that.

I allowed use of 'sandbox' OR 'domain', but not both. Using both raises a ValueError since it would be difficult to judge what the user intended. I added tests for these scenarios, and all the other tests pass.

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 50


Totals Coverage Status
Change from base Build 49: 0.0%
Covered Lines: 353
Relevant Lines: 353

💛 - Coveralls