[Meta] Fix all tests that rely on UID1's super user behavior

Created on 2 April 2024, 4 months ago
Updated 3 June 2024, about 2 months ago

These tickets should be opened as novice users to start with. Good opportunity for new users.

Problem/Motivation

In πŸ“Œ Add a container parameter that can remove the special behavior of UID#1 Fixed an approach was taken where we can simply flag tests that are failing if we turn off user 1's super user powers, so that they can be taken care of in a followup. This issue is to collect all of these followups.

The goal is to have no tests in Drupal core that rely on UID1's special privileges so that we:

  1. Know these tests are correctly assigning the necessary permissions to run
  2. Can turn off the super user access policy in D11, knowing it won't break core
  3. Can remove the super user access policy in D12, providing an admin account recovery tool to replace it

Steps to reproduce

Go into any of the tests flagged with:

  /**
   * {@inheritdoc}
   *
   * @todo Remove and fix test to not rely on super user.
   * @see https://www.drupal.org/project/drupal/issues/3437620
   */

And:

  1. Remove the code below that sets the usesSuperUserAccessPolicy to TRUE.
  2. Run the test to see which test methods are failing

Proposed resolution

Assign the right permissions to make the test go green without the super user access policy. Those few tests that specifically test said policy can obviously stay, but will be removed along with the policy in D12.

Remaining tasks

Fix the individual issues below:

There is one special case: core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php, which is responsible for all Nightwatch tests. I need someone more knowledgeable about that whole set-up to chime in, so that one needs a dedicated issue which in turn might become a meta issue to fix individual Nightwatch tests.

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

None

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 9 hours ago

Created by

πŸ‡§πŸ‡ͺBelgium kristiaanvandeneynde Antwerp, Belgium

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

Comments & Activities

Production build 0.69.0 2024