Skip to content

Update trunk tests to accommodate for new transient in core #95

Closed

Description

@swissspidy

Bug Report

Describe the current, buggy behavior

https://core.trac.wordpress.org/changeset/58025 was merged last week, which added a new transient.

That now causes some tests to fail, see https://github.com/wp-cli/cache-command/actions/runs/8845496490/job/24289764622?pr=89#step:11:88

Describe how other contributors can replicate this bug

Run Behat tests with WP_VERSION=trunk

Describe what you would expect as the correct outcome

Passing tests :)

Let us know what environment you are running this on

Any environment

Provide a possible solution

We could force-delete wp_theme_files_patterns in the tests, or add some new tests specifically targeting 6.6+, and only run the existing ones on <= 6.5. We could also modify the tests a little bit to be less strict (e.g. use "contain" vs "be")

Provide additional context/Screenshots

See link above

Activity

  1. petitphp commented on Apr 26, 2024

    @petitphp
    Contributor

    Will take a look at this.

  2. petitphp commented on Apr 26, 2024

    @petitphp
    Contributor

    @swissspidy I've pushed a fix for this issue.

    Looking at the code which set the new transient, there is a way to disable the cache entirely base on the current development mode. We could use the constant WP_DEVELOPMENT_MODE during the tests to disable WP core caching mecanisms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions