From 55c33c7edeed97d5ef1851495a4986e1b3405a46 Mon Sep 17 00:00:00 2001 From: Oleg Posyniak Date: Thu, 13 Dec 2018 10:57:47 +0200 Subject: [PATCH] MAGECLOUD-2996: Update integration tests to use stable Magento 2.3 (#392) --- src/Test/Integration/CronTest.php | 2 +- src/Test/Integration/Upgrade22Test.php | 37 ++++++++++++++++++++++++++ src/Test/Integration/UpgradeTest.php | 6 ++--- tests/README.md | 5 ++-- tests/travis/script.sh | 2 +- 5 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 src/Test/Integration/Upgrade22Test.php diff --git a/src/Test/Integration/CronTest.php b/src/Test/Integration/CronTest.php index 5cf1dc305e..b48cfa7e9b 100644 --- a/src/Test/Integration/CronTest.php +++ b/src/Test/Integration/CronTest.php @@ -140,7 +140,7 @@ public function testCron($version = null, $locale = 'en_US', $stability = 'stabl public function cronDataProvider(): array { return [ - ['version' => '~2.3.0', 'locale' => 'fr_FR', 'stability' => 'beta'], + ['version' => '2.3.0', 'locale' => 'fr_FR'], ]; } diff --git a/src/Test/Integration/Upgrade22Test.php b/src/Test/Integration/Upgrade22Test.php new file mode 100644 index 0000000000..c1e6e5940a --- /dev/null +++ b/src/Test/Integration/Upgrade22Test.php @@ -0,0 +1,37 @@ +run('2.2.0'); + } + + /** + * @return array + */ + public function defaultDataProvider(): array + { + return [ + ['2.2.0', '2.2.*'], + ]; + } +} diff --git a/src/Test/Integration/UpgradeTest.php b/src/Test/Integration/UpgradeTest.php index 85ca29f043..fff5ee36fd 100644 --- a/src/Test/Integration/UpgradeTest.php +++ b/src/Test/Integration/UpgradeTest.php @@ -13,7 +13,7 @@ /** * {@inheritdoc} * - * @group php71 + * @group php72 */ class UpgradeTest extends AbstractTest { @@ -22,7 +22,7 @@ class UpgradeTest extends AbstractTest */ public static function setUpBeforeClass() { - Bootstrap::getInstance()->run('2.2.0'); + Bootstrap::getInstance()->run('2.3.0'); } /** @@ -72,7 +72,7 @@ public function testDefault(string $fromVersion, string $toVersion) public function defaultDataProvider(): array { return [ - ['2.2.0', '2.2.*'], + ['2.3.0', '2.3.*'], ]; } diff --git a/tests/README.md b/tests/README.md index 5b56d95de7..4b31ad2910 100755 --- a/tests/README.md +++ b/tests/README.md @@ -60,8 +60,9 @@ To run integration tests on Docker, instead of local, proceed with next steps: COMPOSER_MAGENTO_USERNAME={YOUR_MAGENTO_USERNAME} COMPOSER_MAGENTO_PASSWORD={YOUR_MAGENTO_PASSWORD} ``` -3. Run `docker-compose -f ./docker-compose-7.1.yml run -d --build` -4. Run `docker-compose -f ./docker-compose-7.1.yml run cli bash -c "/var/www/ece-tools/vendor/bin/phpunit --exclude-group php70 --verbose --configuration /var/www/ece-tools/tests/integration"` +3. Generate appropriate config `./bin/ece-tools docker:build:integration 7.1 10.0 latest` +4. Run `docker-compose run -d` +5. Run `docker-compose run cli bash -c "/var/www/ece-tools/vendor/bin/phpunit --group php71 --verbose --configuration /var/www/ece-tools/tests/integration"` ## Code coverage check diff --git a/tests/travis/script.sh b/tests/travis/script.sh index f5f2e646fb..0966c98333 100755 --- a/tests/travis/script.sh +++ b/tests/travis/script.sh @@ -21,7 +21,7 @@ case $TEST_SUITE in $BASH -c "${DIR_TOOLS}/vendor/bin/phpunit --group php70 --verbose --configuration ${DIR_TOOLS}/tests/integration" ;; 7.1) - $BASH -c "${DIR_TOOLS}/vendor/bin/phpunit --exclude-group php70,php72 --verbose --configuration ${DIR_TOOLS}/tests/integration" + $BASH -c "${DIR_TOOLS}/vendor/bin/phpunit --group php71 --verbose --configuration ${DIR_TOOLS}/tests/integration" ;; 7.2) $BASH -c "${DIR_TOOLS}/vendor/bin/phpunit --group php72 --verbose --configuration ${DIR_TOOLS}/tests/integration"