Skip to content

Commit 2903ec4

Browse files
authored
MCLOUD-7520: Add using a new tests infrastructure to ece-tools repo (#37)
1 parent f99ac14 commit 2903ec4

23 files changed

+52
-52
lines changed

src/Test/Functional/Acceptance/AcceptanceCe71Cest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ class AcceptanceCe71Cest extends AcceptanceCeCest
2222
/**
2323
* @var string
2424
*/
25-
protected $magentoCloudTemplate = '2.1.18';
25+
protected $magentoCloudTemplate = '2.2.9';
2626
}

src/Test/Functional/Acceptance/AcceptanceCeCest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function _before(\CliTester $I): void
4343
*/
4444
public function testWithSplitBuildCommand(\CliTester $I): void
4545
{
46-
$I->runEceDockerCommand('build:compose --mode=production');
46+
$I->generateDockerCompose('--mode=production');
4747
$I->startEnvironment();
4848
$I->runDockerComposeCommand('run build cloud-build');
4949
$I->runDockerComposeCommand('run deploy cloud-deploy');

src/Test/Functional/Acceptance/AcceptanceCest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public function _before(CliTester $I): void
4747
*/
4848
public function testDefault(\CliTester $I, \Codeception\Example $data): void
4949
{
50-
$I->runEceDockerCommand(
50+
$I->generateDockerCompose(
5151
sprintf(
52-
'build:compose --mode=production --env-vars="%s"',
52+
'--mode=production --env-vars="%s"',
5353
$this->convertEnvFromArrayToJson($data['variables'])
5454
)
5555
);
@@ -254,7 +254,7 @@ public function testWithOldNonSplitBuildCommand(\CliTester $I): void
254254
$config['hooks']['build'] = 'set -e' . PHP_EOL . 'php ./vendor/bin/ece-tools build' . PHP_EOL;
255255
$I->writeAppMagentoYaml($config);
256256

257-
$I->runEceDockerCommand('build:compose --mode=production');
257+
$I->generateDockerCompose('--mode=production');
258258
$I->runDockerComposeCommand('run build cloud-build');
259259
$I->startEnvironment();
260260
$I->runDockerComposeCommand('run deploy cloud-deploy');
@@ -271,7 +271,7 @@ public function testWithOldNonSplitBuildCommand(\CliTester $I): void
271271
public function testDeployInBuild(\CliTester $I): void
272272
{
273273
$tmpConfig = sys_get_temp_dir() . '/app/etc/config.php';
274-
$I->runEceDockerCommand('build:compose --mode=production');
274+
$I->generateDockerCompose('--mode=production');
275275
$I->runDockerComposeCommand('run build cloud-build');
276276
$I->startEnvironment();
277277
$I->runDockerComposeCommand('run deploy cloud-deploy');

src/Test/Functional/Acceptance/AdminCredentialCest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public function _before(\CliTester $I): void
3131
*/
3232
public function testInstallWithoutAdminEmail(\CliTester $I, \Codeception\Example $data): void
3333
{
34-
$I->runEceDockerCommand(
34+
$I->generateDockerCompose(
3535
sprintf(
36-
'build:compose --mode=production --env-vars="%s"',
36+
'--mode=production --env-vars="%s"',
3737
$this->convertEnvFromArrayToJson($data['variables'])
3838
)
3939
);
@@ -88,9 +88,9 @@ protected function installWithoutAdminEmailDataProvider(): array
8888
*/
8989
public function testInstallWithDifferentVariables(\CliTester $I, \Codeception\Example $data)
9090
{
91-
$I->runEceDockerCommand(
91+
$I->generateDockerCompose(
9292
sprintf(
93-
'build:compose --mode=production --env-vars="%s"',
93+
'--mode=production --env-vars="%s"',
9494
$this->convertEnvFromArrayToJson($data['variables'])
9595
)
9696
);

src/Test/Functional/Acceptance/BackupDbCest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected function dataProviderMagentoCloudVersions(): array
8484
private function partRunDbDumpWithoutSplitDbArch(CliTester $I)
8585
{
8686
$I->writeEnvMagentoYaml($this->envMagento);
87-
$I->runEceDockerCommand('build:compose --mode=production');
87+
$I->generateDockerCompose('--mode=production');
8888

8989
// Running database dump command with invalid database label
9090
$I->runDockerComposeCommand('run build cloud-build');
@@ -143,7 +143,7 @@ private function partRunDbDumpWithSplitDbArch(CliTester $I)
143143
$I->writeServicesYaml($services);
144144
$I->writeAppMagentoYaml($appMagento);
145145
$I->writeEnvMagentoYaml($this->envMagento);
146-
$I->runEceDockerCommand('build:compose --mode=production');
146+
$I->generateDockerCompose('--mode=production');
147147
$I->startEnvironment();
148148
$I->runDockerComposeCommand('run deploy cloud-deploy');
149149

src/Test/Functional/Acceptance/CronCest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public function _before(\CliTester $I): void
3232
public function testCron(\CliTester $I, \Codeception\Example $data): void
3333
{
3434
$this->prepareWorkplace($I, $data['version']);
35-
$I->runEceDockerCommand(sprintf(
36-
'build:compose --mode=production --expose-db-port=%s --env-vars="%s"',
35+
$I->generateDockerCompose(sprintf(
36+
'--mode=production --expose-db-port=%s --env-vars="%s"',
3737
$I->getExposedPort(),
3838
$this->convertEnvFromArrayToJson($data['variables'])
3939
));

src/Test/Functional/Acceptance/CronUnlockCest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class CronUnlockCest extends AbstractCest
2020
*/
2121
public function testCronUnlock(\CliTester $I): void
2222
{
23-
$I->runEceDockerCommand(sprintf('build:compose --mode=production --expose-db-port=%s', $I->getExposedPort()));
23+
$I->generateDockerCompose(sprintf('--mode=production --expose-db-port=%s', $I->getExposedPort()));
2424
$I->runDockerComposeCommand('run build cloud-build');
2525
$I->startEnvironment();
2626
$I->runDockerComposeCommand('run deploy cloud-deploy');

src/Test/Functional/Acceptance/DataTypesOptionValidationCest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class DataTypesOptionValidationCest extends AbstractCest
2222
*/
2323
public function dataTypesValidationOnDeploy(\CliTester $I, \Codeception\Example $data): void
2424
{
25-
$I->runEceDockerCommand(
25+
$I->generateDockerCompose(
2626
sprintf(
27-
'build:compose --mode=production --env-vars="%s"',
27+
'--mode=production --env-vars="%s"',
2828
$this->convertEnvFromArrayToJson($data['variables'])
2929
)
3030
);

src/Test/Functional/Acceptance/DatabaseConfigurationCest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class DatabaseConfigurationCest extends AbstractCest
2222
*/
2323
public function databaseConfiguration(\CliTester $I, \Codeception\Example $data): void
2424
{
25-
$I->runEceDockerCommand(
25+
$I->generateDockerCompose(
2626
sprintf(
27-
'build:compose --mode=production --env-vars="%s"',
27+
'--mode=production --env-vars="%s"',
2828
$this->convertEnvFromArrayToJson($data['variables'])
2929
)
3030
);
@@ -97,9 +97,9 @@ public function installAndRedeployWithTablePrefix(\CliTester $I)
9797
$I->see('CMS homepage content goes here.');
9898
};
9999

100-
$I->runEceDockerCommand(
100+
$I->generateDockerCompose(
101101
sprintf(
102-
'build:compose --mode=production --env-vars="%s"',
102+
'--mode=production --env-vars="%s"',
103103
$this->convertEnvFromArrayToJson([
104104
'MAGENTO_CLOUD_VARIABLES' => [
105105
'DATABASE_CONFIGURATION'=>[

src/Test/Functional/Acceptance/ElasticSearchCest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testElastic(\CliTester $I, \Codeception\Example $data): void
3737

3838
$this->prepareWorkplace($I, $data['magento']);
3939

40-
$I->runEceDockerCommand('build:compose --mode=production');
40+
$I->generateDockerCompose('--mode=production');
4141

4242
$I->runDockerComposeCommand('run build cloud-build');
4343
$I->startEnvironment();
@@ -62,7 +62,7 @@ public function testElastic(\CliTester $I, \Codeception\Example $data): void
6262
$this->removeEs = true;
6363
$this->removeESIfExists($I);
6464

65-
$I->runEceDockerCommand('build:compose --mode=production');
65+
$I->generateDockerCompose('--mode=production');
6666

6767
$I->runDockerComposeCommand('run build cloud-build');
6868
$I->startEnvironment();

0 commit comments

Comments
 (0)