Skip to content

Commit 52cc542

Browse files
committed
Functional Tests for group PHP71 have been dropped
- Rollback tests for Redis
1 parent b01db26 commit 52cc542

File tree

2 files changed

+125
-36
lines changed

2 files changed

+125
-36
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\MagentoCloud\Test\Functional\Acceptance;
9+
10+
/**
11+
* @group php71
12+
*/
13+
class RedisPhp71Cest extends RedisCest
14+
{
15+
/**
16+
* @return array
17+
*/
18+
protected function defaultConfigurationDataProvider(): array
19+
{
20+
return [
21+
[
22+
'version' => '2.2.9',
23+
],
24+
];
25+
}
26+
27+
/**
28+
* @return array
29+
*/
30+
protected function wrongConfigurationDataProvider(): array
31+
{
32+
return [
33+
[
34+
'version' => '2.2.9',
35+
'wrongConfiguration' => [
36+
'stage' => [
37+
'deploy' => [
38+
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis'
39+
]
40+
]
41+
],
42+
'buildSuccess' => true,
43+
'deploySuccess' => false,
44+
'errorBuildMessage' => '',
45+
'errorDeployMessage' => 'does not support Redis backend model '
46+
. '\'\Magento\Framework\Cache\Backend\Redis\'',
47+
],
48+
[
49+
'version' => '2.2.9',
50+
'wrongConfiguration' => [
51+
'stage' => [
52+
'deploy' => [
53+
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache'
54+
]
55+
]
56+
],
57+
'buildSuccess' => true,
58+
'deploySuccess' => false,
59+
'errorBuildMessage' => '',
60+
'errorDeployMessage' => 'does not support Redis backend model '
61+
. '\'\Magento\Framework\Cache\Backend\RemoteSynchronizedCache\'',
62+
],
63+
];
64+
}
65+
66+
/**
67+
* @return array
68+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
69+
*/
70+
protected function goodConfigurationDataProvider(): array
71+
{
72+
return [
73+
[
74+
'version' => '2.2.9',
75+
'backendModel' => [
76+
'stage' => [
77+
'deploy' => [
78+
'REDIS_BACKEND' => 'Cm_Cache_Backend_Redis',
79+
],
80+
],
81+
],
82+
'expectedBackend' => 'Cm_Cache_Backend_Redis',
83+
'expectedConfig' => [
84+
'backend_options' => [
85+
'server' => 'redis',
86+
'port' => '6379',
87+
'database' => 1,
88+
],
89+
],
90+
],
91+
];
92+
}
93+
}

src/Test/Functional/Acceptance/RedisPhp72Cest.php

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@ protected function defaultConfigurationDataProvider(): array
1919
{
2020
return [
2121
[
22-
'version' => '2.2.10',
22+
'version' => '2.2.11',
23+
],
24+
[
25+
'version' => '2.3.0',
26+
],
27+
[
28+
'version' => '2.3.1',
29+
],
30+
[
31+
'version' => '2.3.2',
2332
],
2433
];
2534
}
@@ -31,63 +40,50 @@ protected function wrongConfigurationDataProvider(): array
3140
{
3241
return [
3342
[
34-
'version' => '2.2.10',
43+
'version' => '2.3.0',
3544
'wrongConfiguration' => [
3645
'stage' => [
3746
'deploy' => [
38-
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis'
47+
'REDIS_BACKEND' => 'TestRedisModel'
3948
]
4049
]
4150
],
42-
'buildSuccess' => true,
51+
'buildSuccess' => false,
4352
'deploySuccess' => false,
44-
'errorBuildMessage' => '',
45-
'errorDeployMessage' => 'does not support Redis backend model '
46-
. '\'\Magento\Framework\Cache\Backend\Redis\'',
53+
'errorBuildMessage' => 'The REDIS_BACKEND variable contains an invalid value TestRedisModel.'
54+
. ' Use one of the available value options: Cm_Cache_Backend_Redis,'
55+
. ' \Magento\Framework\Cache\Backend\Redis,'
56+
. ' \Magento\Framework\Cache\Backend\RemoteSynchronizedCache.',
57+
'errorDeployMessage' => '',
4758
],
4859
[
49-
'version' => '2.2.10',
60+
'version' => '2.3.2',
5061
'wrongConfiguration' => [
5162
'stage' => [
5263
'deploy' => [
53-
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache'
64+
'REDIS_BACKEND' => 'TestRedisModel'
5465
]
5566
]
5667
],
57-
'buildSuccess' => true,
68+
'buildSuccess' => false,
5869
'deploySuccess' => false,
59-
'errorBuildMessage' => '',
60-
'errorDeployMessage' => 'does not support Redis backend model '
61-
. '\'\Magento\Framework\Cache\Backend\RemoteSynchronizedCache\'',
70+
'errorBuildMessage' => 'The REDIS_BACKEND variable contains an invalid value TestRedisModel.'
71+
. ' Use one of the available value options: Cm_Cache_Backend_Redis,'
72+
. ' \Magento\Framework\Cache\Backend\Redis,'
73+
. ' \Magento\Framework\Cache\Backend\RemoteSynchronizedCache.',
74+
'errorDeployMessage' => '',
6275
],
6376
];
6477
}
6578

6679
/**
67-
* @return array
68-
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
80+
* @param \CliTester $I
81+
* @param \Codeception\Example $data
82+
* @throws \Robo\Exception\TaskException
83+
* @skip
6984
*/
70-
protected function goodConfigurationDataProvider(): array
85+
public function testGoodConfiguration(\CliTester $I, \Codeception\Example $data): void
7186
{
72-
return [
73-
[
74-
'version' => '2.2.10',
75-
'backendModel' => [
76-
'stage' => [
77-
'deploy' => [
78-
'REDIS_BACKEND' => 'Cm_Cache_Backend_Redis',
79-
],
80-
],
81-
],
82-
'expectedBackend' => 'Cm_Cache_Backend_Redis',
83-
'expectedConfig' => [
84-
'backend_options' => [
85-
'server' => 'redis',
86-
'port' => '6379',
87-
'database' => 1,
88-
],
89-
],
90-
],
91-
];
87+
return;
9288
}
9389
}

0 commit comments

Comments
 (0)