Tests should not do requests to updates.drupal.org

Created on 20 November 2019, about 5 years ago
Updated 13 March 2023, almost 2 years ago

Problem/Motivation

In #3074993-31: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates it became clear that our tests that extend \Drupal\FunctionalTests\Update\UpdatePathTestBase and some other tests make real calls out to updates.drupal.org that fetch XML. These test aren't actually meant to test this XML request. They just happen to make it.

If the requests aren't successful the tests don't fail because the test aren't asserting anything about the responses. If the requests are successful but the XML isn't in an expected format the test will fail.

So basically we are inadvertently testing the format of live XML on updates.drupal.org and these requests may be slowing down our test suite.

Proposed resolution

Make sure we aren't making calls to updates.drupal.org.

All tests that extend UpdatePathTestBase or otherwise would trigger requests to updates.drupal.org should actually be calling something like \Drupal\Tests\update\Functional\UpdateTestBase::refreshUpdateStatus() to change the update URL so we aren't making real requests to updates.drupal.org

Remaining tasks

all

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs work

Version

10.1

Component
PHPUnit 

Last updated about 20 hours ago

Created by

🇺🇸United States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024