Skip to content
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

CRM-19154, CRM-18808 - Add E2E tests for web-service end-points. SOAP/REST fixes. #8914

Merged
merged 8 commits into from
Aug 27, 2016

Conversation

totten
Copy link
Member

@totten totten commented Aug 23, 2016

Inspired by the regressions of CRM-19154, this PR adds a new suite,
E2E_AllTests, for end-to-end integration tests of backend scripts like
extern/soap.php and extern/rest.php.

Note: I've updated Jenkins (CiviCRM-Core-PR) to execute E2E_AllTests if
it is available. Jenkins will run it on Drupal (because that's the test
site it creates); however, I'm hoping/expecting it will also run on WP.

While working on the test, I hit upon some bugs/regressions in the
extern/soap.php and extern/rest.php end-points. These have patches
included.


@totten totten changed the title CRM-19154, etal - Add E2E tests for web-service end-points CRM-19154, CRM-18808 - Add E2E tests for web-service end-points. SOAP/REST fixes. Aug 23, 2016
This function call bombs (on Drupal) because the method is not really
static. Need this to work so we can have a test...
Now-a-days, HTTP headers are outputted using CMS functions, which means
that the CMS must always boot -- even if you're only displaying an error
message. This caused regressions in the REST error handling.  Why?
The boot sequence is really quirky with the REST calls... and the
required CMS functions were not always available.

This revision ensures that (one way or another) the CMS does get booted.
Notably, though, in the error scenarios, it boots *without* loading or
authenticating a user.
@totten
Copy link
Member Author

totten commented Aug 23, 2016

Note: Rebased. Updated commit notes to reference CRM-18808 and tweaked README.md.

@totten
Copy link
Member Author

totten commented Aug 27, 2016

This main patch for extern/soap.php is nearly identical to one that has been floating around the wild (e.g. https://forum.civicrm.org/index.php?topic=37195.0). Most of the SLOC are new tests which should not have functional impacts.

@totten totten merged commit cea9106 into civicrm:master Aug 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants