Tests for update.module
catch - May 1, 2008 - 13:27
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | tests |
| Category: | task |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
There's currently no update.test for update module.

#1
whoops.
#2
Change component is relation to http://drupal.org/node/253744.
#3
This was one of the modules that we weren't planning on witting tests for unless someone comes up with a way to.
Related: http://drupal.org/node/243096
#4
The best way to make tests for this would be to either harvest or manually construct some of the XML input files that update.module fetches and include those with the tests. Then, you could write the tests such that they force update.module to fetch your local copies of the input files, and to alter the .info for the core modules to do a "parameter sweep" for the various states of not-fully-up-to-date that a site could be in. Each test would setup an initial state and "current" state of available releases, then compare the output of various functions relative to what you'd expect.
That said, there are some pretty major API refactorings that should happen to make this module easier to test, which would also help solve problems such as #232041: Fatal error: Maximum execution time of 60 seconds exceeded (when fetching update status data) and #238950: Reduce RAM resource consumption.
#5
Looks like this is waiting on API patches.