Skip to content

Commit 9294d30

Browse files
authored
MCLOUD-7283: Ece-tools Upgrade to 2002.1.3 breaks the environment with Search engine "elasticsuite" (#16)
1 parent a4ec8b6 commit 9294d30

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Config/Validator/Deploy/SearchConfiguration.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\MagentoCloud\App\Error;
1111
use Magento\MagentoCloud\App\GenericException;
1212
use Magento\MagentoCloud\Config\ConfigMerger;
13+
use Magento\MagentoCloud\Config\SearchEngine\ElasticSuite;
1314
use Magento\MagentoCloud\Config\Stage\DeployInterface;
1415
use Magento\MagentoCloud\Config\Validator;
1516
use Magento\MagentoCloud\Config\Validator\ResultFactory;
@@ -74,7 +75,7 @@ public function validate(): Validator\ResultInterface
7475

7576
if ($this->magentoVersion->isGreaterOrEqual('2.4.0')
7677
&& isset($searchConfig['engine'])
77-
&& $searchConfig['engine'] != ElasticSearch::ENGINE_NAME
78+
&& !in_array($searchConfig['engine'], [ElasticSearch::ENGINE_NAME, ElasticSuite::ENGINE_NAME])
7879
) {
7980
return $this->resultFactory->errorByCode(Error::DEPLOY_WRONG_SEARCH_ENGINE);
8081
}

src/Test/Unit/Config/Validator/Deploy/SearchConfigurationTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@ public function validateDataProvider(): array
174174
Success::class,
175175
true
176176
],
177+
[
178+
[
179+
'engine' => 'elasticsuite',
180+
],
181+
Success::class,
182+
true
183+
],
177184
];
178185
}
179186

0 commit comments

Comments
 (0)