-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.CalloutException #18
Comments
Seems like I'm in a catch 22 situation here. The linked "fixed" issue in the previous comment says that the workaround is to retrieve an existing entry with an SOQL query, but the test environment doesn't have any cases of |
Sorry for the delay! I've moved setting the mock to the Webhook class. I think that might fix this but I've been having a hard time reproducing this. Can you delete the generated trigger, test, and Webhook class, then recreate them via https://salesforce-webhook-creator.herokuapp.com/ Then re-run the tests and let me know what happens? |
I'm afraid I'm not in a position where I can delete the triggers I've got set up. FTR my workaround to get through the testing phase was to add some testonly logic to the trigger (a massive hack, but oh well...)
|
Cool. Glad you found a workaround. In case you are curious, these are the changes to the Apex template that I think fixes this: 32df703 |
First of all - great work with this project. It's been amazing so far but it appears that I'm bumping into one of Salesforce's idiosyncrasies.
When I try to run my test in production (not in a sandbox), I get the following test failure in the generated WebhookTriggerTest:
There's a couple of places that mention this error, here's one example: https://success.salesforce.com/issues_view?id=a1p30000000jbNMAAY
And my trigger code is here:
with everything else about the hook being default.
Please could I get some advice one what to do to work around this issue? I'm not sure how I'd modify the testcase to not perform an insert and callout...
The text was updated successfully, but these errors were encountered: