Skip to content

Commit

Permalink
MAGECLOUD-2996: Update integration tests to use stable Magento 2.3 (#392
Browse files Browse the repository at this point in the history
)
  • Loading branch information
shiftedreality committed Dec 13, 2018
1 parent e517b5c commit 55c33c7
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Test/Integration/CronTest.php
Expand Up @@ -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'],
];
}

Expand Down
37 changes: 37 additions & 0 deletions src/Test/Integration/Upgrade22Test.php
@@ -0,0 +1,37 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\MagentoCloud\Test\Integration;

use Magento\MagentoCloud\Command\Build;
use Magento\MagentoCloud\Command\Deploy;
use Magento\MagentoCloud\Command\PostDeploy;
use Symfony\Component\Console\Tester\CommandTester;

/**
* {@inheritdoc}
*
* @group php71
*/
class Upgrade22Test extends AbstractTest
{
/**
* @inheritdoc
*/
public static function setUpBeforeClass()
{
Bootstrap::getInstance()->run('2.2.0');
}

/**
* @return array
*/
public function defaultDataProvider(): array
{
return [
['2.2.0', '2.2.*'],
];
}
}
6 changes: 3 additions & 3 deletions src/Test/Integration/UpgradeTest.php
Expand Up @@ -13,7 +13,7 @@
/**
* {@inheritdoc}
*
* @group php71
* @group php72
*/
class UpgradeTest extends AbstractTest
{
Expand All @@ -22,7 +22,7 @@ class UpgradeTest extends AbstractTest
*/
public static function setUpBeforeClass()
{
Bootstrap::getInstance()->run('2.2.0');
Bootstrap::getInstance()->run('2.3.0');
}

/**
Expand Down Expand Up @@ -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.*'],
];
}

Expand Down
5 changes: 3 additions & 2 deletions tests/README.md
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/travis/script.sh
Expand Up @@ -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"
Expand Down

0 comments on commit 55c33c7

Please sign in to comment.