diff --git a/features/cli.feature b/features/cli.feature index a749632fd..ca3d3a60c 100644 --- a/features/cli.feature +++ b/features/cli.feature @@ -214,15 +214,15 @@ Feature: `wp cli` tasks """ And the return code should be 1 - Scenario: Update succeeds when sha512 matches even if md5 cannot be accessed + Scenario: Update only verifies the sha512 hash Given an empty directory And a new Phar with version "2.8.0" And that HTTP requests to https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar.md5 will respond with: """ - HTTP/1.1 404 Not Found + HTTP/1.1 200 OK Content-Type: text/plain - Not Found + invalidmd5hash """ When I run `{PHAR_PATH} cli update --nightly --yes` @@ -230,9 +230,9 @@ Feature: `wp cli` tasks """ sha512 hash verified: """ - And STDOUT should contain: + And STDOUT should not contain: """ - Couldn't access md5 hash for release (HTTP code 404). + md5 """ And STDOUT should contain: """ @@ -241,28 +241,6 @@ Feature: `wp cli` tasks And STDERR should be empty And the return code should be 0 - Scenario: Fail update when md5 hash mismatches - Given an empty directory - And a new Phar with version "2.8.0" - And that HTTP requests to https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar.md5 will respond with: - """ - HTTP/1.1 200 OK - Content-Type: text/plain - - invalidmd5hash - """ - - When I try `{PHAR_PATH} cli update --nightly --yes` - Then STDERR should contain: - """ - Error: md5 hash for download - """ - And STDERR should contain: - """ - is different than the release hash (invalidmd5hash). - """ - And the return code should be 1 - Scenario: Prevent stable update when PHP version requirement is not met Given an empty directory And a new Phar with version "2.8.0"