Skip to content

Commit af5f3df

Browse files
committed
Remove abstract implementation for failed tests
1 parent 325d5be commit af5f3df

File tree

6 files changed

+135
-6
lines changed

6 files changed

+135
-6
lines changed

src/Test/Functional/Acceptance/DataTypesOptionValidationCest.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,25 @@ public function dataTypesValidationOnDeploy(\CliTester $I, \Codeception\Example
4343
/**
4444
* @return array
4545
*/
46-
abstract protected function dataTypesDataProvider(): array;
46+
protected function dataTypesDataProvider(): array
47+
{
48+
return [
49+
'string_instead_integer' => [
50+
'variables' => [
51+
'MAGENTO_CLOUD_VARIABLES' => [
52+
'SCD_THREADS' => 'one',
53+
],
54+
],
55+
'expectedError' => 'SCD_THREADS has wrong value',
56+
],
57+
'integer_instead_boolean' => [
58+
'variables' => [
59+
'MAGENTO_CLOUD_VARIABLES' => [
60+
'CLEAN_STATIC_FILES' => 1,
61+
],
62+
],
63+
'expectedError' => 'CLEAN_STATIC_FILES has wrong value',
64+
],
65+
];
66+
}
4767
}

src/Test/Functional/Acceptance/DatabaseConfigurationCest.php

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,46 @@ public function databaseConfiguration(\CliTester $I, \Codeception\Example $data)
4646
/**
4747
* @return array
4848
*/
49-
abstract protected function databaseConfigurationDataProvider(): array;
49+
protected function databaseConfigurationDataProvider(): array
50+
{
51+
return [
52+
'singleConfig' => [
53+
'variables' => [
54+
'MAGENTO_CLOUD_VARIABLES' => [
55+
'DATABASE_CONFIGURATION'=>['some_config' => 'value', '_merge' => true],
56+
],
57+
],
58+
'mergedConfig' => 'some_config',
59+
'defaultConfig' => 'db',
60+
],
61+
'multiConfig' => [
62+
'variables' => [
63+
'MAGENTO_CLOUD_VARIABLES' => [
64+
'DATABASE_CONFIGURATION'=>[
65+
'connection' => [
66+
'default' => [
67+
'engine' => 'innodb',
68+
'initStatements' => 'SET NAMES utf8;',
69+
'active' => '1',
70+
'driver_options' => [
71+
'1001' => '1',
72+
],
73+
],
74+
'indexer' => [
75+
'driver_options' => [
76+
'1001' => '1',
77+
],
78+
],
79+
],
80+
'_merge' => true,
81+
],
82+
],
83+
],
84+
'mergedConfig' => '1001',
85+
'defaultConfig' => 'db',
86+
],
87+
];
88+
}
5089

5190
/**
5291
* Check that magento can be installed and updated with configured table prefixes

src/Test/Functional/Acceptance/PostDeployCest.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,19 @@ public function testPostDeploy(\CliTester $I, \Codeception\Example $data): void
5353
/**
5454
* @return array
5555
*/
56-
abstract protected function postDeployDataProvider(): array;
56+
protected function postDeployDataProvider(): array
57+
{
58+
return [
59+
[
60+
'variables' => [
61+
'MAGENTO_CLOUD_VARIABLES' => ['ADMIN_EMAIL' => 'admin@example.com']
62+
],
63+
],
64+
[
65+
'variables' => ['MAGENTO_CLOUD_VARIABLES' => []]
66+
],
67+
];
68+
}
5769

5870
/**
5971
* @param \CliTester $I

src/Test/Functional/Acceptance/ScdMatrixCest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,12 @@ public function testScdOnDeploy(\CliTester $I, \Codeception\Example $data): void
4141
/**
4242
* @return array
4343
*/
44-
abstract protected function scdOnDeployDataProvider(): array;
44+
protected function scdOnDeployDataProvider(): array
45+
{
46+
return [
47+
['env_yaml' => 'files/scd/env_matrix_1.yaml'],
48+
['env_yaml' => 'files/scd/env_matrix_2.yaml'],
49+
['env_yaml' => 'files/scd/env_matrix_3.yaml'],
50+
];
51+
}
4552
}

src/Test/Functional/Acceptance/ScdStrategyCest.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,21 @@ public function testScdStrategyOnDeploy(\CliTester $I, \Codeception\Example $dat
4343
/**
4444
* @return array
4545
*/
46-
abstract protected function scdStrategyDataProvider(): array;
46+
protected function scdStrategyDataProvider(): array
47+
{
48+
return [
49+
[
50+
'env_yaml' => 'files/scd/scd-strategy-quick.yaml',
51+
'strategy' => 'quick'
52+
],
53+
[
54+
'env_yaml' => 'files/scd/scd-strategy-standard.yaml',
55+
'strategy' => 'standard'
56+
],
57+
[
58+
'env_yaml' => 'files/scd/scd-strategy-compact.yaml',
59+
'strategy' => 'compact'
60+
],
61+
];
62+
}
4763
}

src/Test/Functional/Acceptance/SessionConfigurationCest.php

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,40 @@ public function sessionConfiguration(\CliTester $I, \Codeception\Example $data):
4545
/**
4646
* @return array
4747
*/
48-
abstract protected function sessionConfigurationDataProvider(): array;
48+
protected function sessionConfigurationDataProvider(): array
49+
{
50+
return [
51+
'singleConfig' => [
52+
'variables' => [
53+
'MAGENTO_CLOUD_VARIABLES' => [
54+
'SESSION_CONFIGURATION'=>['max_concurrency' => '10', '_merge' => true],
55+
],
56+
],
57+
'mergedConfig' => 'max_concurrency',
58+
'defaultConfig' => 'redis',
59+
],
60+
'withoutMerge' => [
61+
'variables' => [
62+
'MAGENTO_CLOUD_VARIABLES' => [
63+
'SESSION_CONFIGURATION'=>[
64+
'save' => 'redis',
65+
'redis' => [
66+
'host' => 'redis.internal',
67+
'port' => '6379',
68+
'database' => 0,
69+
'disable_locking' => 1,
70+
'max_concurrency' => 10,
71+
'bot_first_lifetime' => 100,
72+
'bot_lifetime' => 10000,
73+
'min_lifetime' => 100,
74+
'max_lifetime' => 10000,
75+
],
76+
],
77+
]
78+
],
79+
'mergedConfig' => 'max_concurrency',
80+
'defaultConfig' => 'redis',
81+
],
82+
];
83+
}
4984
}

0 commit comments

Comments
 (0)