Skip to content

Commit 01ac65c

Browse files
Copilotswissspidy
andcommitted
Fix test: use --exclude instead of specifying event names
The previous approach of specifying event names failed because wp_cli_network_test_site2 only exists on site2, causing validation to fail on other sites. Changed to use --due-now --network with --exclude flag to filter out WordPress core events while allowing site-specific events to run where they exist. Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent e7ccf4c commit 01ac65c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/cron-event.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Feature: Manage WP Cron events
184184
Success: Scheduled event with hook 'wp_cli_network_test_site2'
185185
"""
186186

187-
When I run `wp cron event run wp_cli_network_test wp_cli_network_test_site2 --due-now --network`
187+
When I run `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`
188188
Then STDOUT should contain:
189189
"""
190190
Executed the cron event 'wp_cli_network_test'

0 commit comments

Comments
 (0)