[wp-trac] [WordPress Trac] #54420: Tests: Mock REST API remote requests

WordPress Trac noreply at wordpress.org
Thu Nov 11 15:43:01 UTC 2021


#54420: Tests: Mock REST API remote requests
------------------------------+--------------------
 Reporter:  hellofromTonya    |      Owner:  (none)
     Type:  task (blessed)    |     Status:  new
 Priority:  normal            |  Milestone:  6.0
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
  Focuses:  rest-api          |
------------------------------+--------------------
 Recent timeout failures ([https://github.com/WordPress/wordpress-
 develop/runs/4174016878?check_suite_focus=true see GitHub failed job]) of
 specific REST API tests show some tests are not mocking the remote
 requests. These requests can be mocked with a callback hooked into
 `'pre_http_request'` filter.

 Each test should be reviewed to determine:
 * If a remote request to a live API endpoint is being made
 * If those specific requests should/can be mocked
 * and then mocks created for each in its context of the condition under
 test

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54420>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list