You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenario: Attempting to downgrade without --force shows helpful message
425
+
Given a WP install
426
+
427
+
When I run `wp core version`
428
+
Then save STDOUT as {WP_CURRENT_VERSION}
429
+
430
+
When I try `wp core update --version=6.0`
431
+
Then STDOUT should contain:
432
+
"""
433
+
WordPress is up to date at version
434
+
"""
435
+
And STDOUT should contain:
436
+
"""
437
+
is older than the current version
438
+
"""
439
+
And STDOUT should contain:
440
+
"""
441
+
Use --force to update anyway
442
+
"""
443
+
And STDOUT should not contain:
444
+
"""
445
+
Success:
446
+
"""
447
+
And the return code should be 0
448
+
449
+
When I run `wp core update --version=6.0 --force`
450
+
Then STDOUT should contain:
451
+
"""
452
+
Updating to version 6.0
453
+
"""
454
+
And STDOUT should contain:
455
+
"""
456
+
Success: WordPress updated successfully.
457
+
"""
458
+
459
+
Scenario: Show helpful tip when update is locked
460
+
Given a WP install
461
+
462
+
When I run `wp option update core_updater.lock 100000000000000`
463
+
And I try `wp core update --version=trunk`
464
+
Then STDERR should contain:
465
+
"""
466
+
Another update is currently in progress. You may need to run `wp option delete core_updater.lock` after verifying another update isn't actually running.
0 commit comments