Skip to content

Fix tests for WordPress 7.1 #145

Description

@swissspidy

In WordPress 7.1 there's a new wp_privacy_personal_data_cleanup_requests function that also runs on a cron schedule (wp_schedule_event( time(), 'daily', 'wp_privacy_personal_data_cleanup_requests' );)

See https://core.trac.wordpress.org/ticket/44498 / WordPress/wordpress-develop@f04cb62

That's why there's currently 1 test failure when running against WP trunk:

001 Scenario: Run cron events with --network flag on multisite # features/cron-event.feature:170
      And STDOUT should contain:                               # features/cron-event.feature:196
        $ wp cron event run --due-now --network --exclude=wp_privacy_delete_old_export_files,wp_version_check,wp_update_plugins,wp_update_themes,wp_site_health_scheduled_check,wp_update_user_counts,wp_scheduled_delete,wp_scheduled_auto_draft_delete
        Executed the cron event 'wp_privacy_personal_data_cleanup_requests' in 0.002s.
        Executed the cron event 'wp_cli_network_test' in 0.001s.
        Executed the cron event 'wp_privacy_personal_data_cleanup_requests' in 0.002s.
        Executed the cron event 'wp_cli_network_test_site2' in 0.001s.
        Success: Executed a total of 4 cron events across 3 sites.
        
        cwd: /tmp/wp-cli-test-run--6a4f5010126bf5.25523346/
        run time: 0.36868691444397
        exit status: 0
        
        Output does not contain expected string:
        Success: Executed a total of 2 cron events across 3 sites.
        
        --- Expected
        +++ Actual
        @@ @@
        -Success: Executed a total of 2 cron events across 3 sites.
        +Executed the cron event 'wp_privacy_personal_data_cleanup_requests' in 0.002s.
        +Executed the cron event 'wp_cli_network_test' in 0.001s.
        +Executed the cron event 'wp_privacy_personal_data_cleanup_requests' in 0.002s.
        +Executed the cron event 'wp_cli_network_test_site2' in 0.001s.
        +Success: Executed a total of 4 cron events across 3 sites.
         (Exception)

1 scenario (1 failed)

This can be fixed by adding wp_privacy_personal_data_cleanup_requests to the exclusion list in that test.

Activity

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions