diff --git a/.drone.yml b/.drone.yml index a7260ecc..900522b7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -125,31 +125,13 @@ trigger: --- kind: pipeline -name: php71-stable15 +name: php73-stable20 steps: - - name: php71-stable15 - image: nextcloudci/php7.1:php7.1-16 - commands: - - make test-stable15 - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: php72-stable15 - -steps: - - name: php72-stable15 - image: nextcloudci/php7.2:php7.2-12 + - name: php73-stable20 + image: nextcloudci/php7.3:php7.3-5 commands: - - make test-stable15 + - make test-stable20 trigger: branch: @@ -161,13 +143,13 @@ trigger: --- kind: pipeline -name: php73-stable15 +name: php74-stable20 steps: - - name: php73-stable15 - image: nextcloudci/php7.3:php7.3-2 + - name: php74-stable20 + image: nextcloudci/php7.4:php7.4-3 commands: - - make test-stable15 + - make test-stable20 trigger: branch: diff --git a/Makefile b/Makefile index 7ab7f636..30bd65d6 100644 --- a/Makefile +++ b/Makefile @@ -26,8 +26,8 @@ test-cli: updater.phar test/vendor test-stable19: updater.phar test/vendor cd tests && vendor/behat/behat/bin/behat features/stable19.feature -test-stable15: updater.phar test/vendor - cd tests && vendor/behat/behat/bin/behat features/stable15.feature +test-stable20: updater.phar test/vendor + cd tests && vendor/behat/behat/bin/behat features/stable20.feature test-stable16: updater.phar test/vendor cd tests && vendor/behat/behat/bin/behat features/stable16.feature diff --git a/tests/features/bootstrap/FeatureContext.php b/tests/features/bootstrap/FeatureContext.php index d531585c..fd92575d 100644 --- a/tests/features/bootstrap/FeatureContext.php +++ b/tests/features/bootstrap/FeatureContext.php @@ -242,12 +242,30 @@ public function getSignatureForVersion($version) { CN6Aim4OoaZz4U7coPSi6pyRKcsV2KAaxlHIHzj71EjqV7gaoZRhzSnN/NomPu6D hfOAOW47o1GsZXt4euDJMpye1h8PE1csaaeCvc0gla7C6KE4LfTO0nLTu/yTNcB9 HNkEiZqVg/EjiuZHcSXd/g==', + '20.0.0RC1' => 'fLz3hBBrPXl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d0TVUqo3cVPKWaN7/5dEbIcJKcS9Z0V334sBaJAfXe+YgV6lRmPHrGuTK34+tUc +l9/OHJrazOO7tEDRdtM4zpFE7y9kHsqTTR2MTEVLwIZ5JsgTPHE2/im0wlWLk3UI +4Oo5TPt1EOgNbYHfEBY8FPKCL6JyT2ySBaQKYdfJMgkxUZw00BMjplhNUgXEhvd2 +f8tPNZ3cs7hyr0SQFx96gyFcCQ4+5KohnLGqZnNSyV7ovHbYEzXUCmmULlm02zSu +V367c1FDks7iKs/V96u21NuF14IQzI0mEzMzysPINrKbHC+OU1BKHKOHqRJjkHwQ +fNJsXi16UkYMGUXyQWQXHg==', ]; if(isset($signatures[$version])) { diff --git a/tests/features/stable15.feature b/tests/features/stable15.feature deleted file mode 100644 index 1b4ba20d..00000000 --- a/tests/features/stable15.feature +++ /dev/null @@ -1,54 +0,0 @@ -Feature: CLI updater - stable15 base - - Scenario: Update is available - 15.0.0 beta 1 to 15.0.0 RC 1 - Given the current installed version is 15.0.0beta1 - And there is an update to prerelease version "15.0.0RC1" available - And the version number is decreased in the config.php to enforce upgrade - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 15.0 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available but unexpected folder found - 15.0.9 to 15.0.10 - Given the current installed version is 15.0.9 - And there is an update to version 15.0.10 available - And there is a folder called "test123" - When the CLI updater is run - Then the return code should not be 0 - And the output should contain "The following extra files have been found" - Then the installed version should be 15.0.9 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available and .well-known folder exist - 15.0.9 to 15.0.10 - Given the current installed version is 15.0.9 - And there is an update to version 15.0.10 available - And there is a folder called ".well-known" - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 15.0.10 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available and .rnd file exist - 15.0.9 to 15.0.10 - Given the current installed version is 15.0.9 - And there is an update to version 15.0.10 available - And there is a folder called ".rnd" - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 15.0.10 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available - 15.0.0 to master daily - Given the current installed version is 15.0.0RC1 - And PHP is at least in version 7.0 - And the current channel is "beta" - And there is an update to version 16.0.3 available - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 16.0 - And maintenance mode should be off - And upgrade is not required - diff --git a/tests/features/stable20.feature b/tests/features/stable20.feature new file mode 100644 index 00000000..3db086cf --- /dev/null +++ b/tests/features/stable20.feature @@ -0,0 +1,54 @@ +Feature: CLI updater - stable20 base + + Scenario: Update is available - 20.0.0 beta 1 to 20.0.0 RC 1 + Given the current installed version is 20.0.0beta1 + And there is an update to prerelease version "20.0.0RC1" available + And the version number is decreased in the config.php to enforce upgrade + When the CLI updater is run successfully + And the output should contain "Update successful" + Then the installed version should be 20.0 + And maintenance mode should be off + And upgrade is not required + + Scenario: Update is available but unexpected folder found - 20.0.7 to 20.0.8 + Given the current installed version is 20.0.7 + And there is an update to version 20.0.8 available + And there is a folder called "test123" + When the CLI updater is run + Then the return code should not be 0 + And the output should contain "The following extra files have been found" + Then the installed version should be 20.0.7 + And maintenance mode should be off + And upgrade is not required + + Scenario: Update is available and .well-known folder exist - 20.0.7 to 20.0.8 + Given the current installed version is 20.0.7 + And there is an update to version 20.0.8 available + And there is a folder called ".well-known" + When the CLI updater is run successfully + And the output should contain "Update successful" + Then the installed version should be 20.0.8 + And maintenance mode should be off + And upgrade is not required + + Scenario: Update is available and .rnd file exist - 20.0.7 to 20.0.10 + Given the current installed version is 20.0.7 + And there is an update to version 20.0.8 available + And there is a folder called ".rnd" + When the CLI updater is run successfully + And the output should contain "Update successful" + Then the installed version should be 20.0.8 + And maintenance mode should be off + And upgrade is not required + + Scenario: Update is available - 20.0.0 to beta + Given the current installed version is 20.0.0RC1 + And PHP is at least in version 7.3 + And the current channel is "beta" + And there is an update to version 21.0.0 available + When the CLI updater is run successfully + And the output should contain "Update successful" + Then the installed version should be 21.0 + And maintenance mode should be off + And upgrade is not required +