Skip to content

Commit

Permalink
MCLOUD-7304: Release ece-tools 2002.1.4 (magento#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
NadiyaS authored Nov 19, 2020
1 parent 7c7b400 commit 2e370d4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/ece-tools",
"description": "Provides tools to build and deploy Magento 2 Enterprise Edition",
"type": "magento2-component",
"version": "2002.1.3",
"version": "2002.1.4",
"license": "OSL-3.0",
"repositories": {
"repo.magento.com": {
Expand Down
4 changes: 2 additions & 2 deletions src/Config/Validator/Deploy/SearchConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
use Magento\MagentoCloud\App\Error;
use Magento\MagentoCloud\App\GenericException;
use Magento\MagentoCloud\Config\ConfigMerger;
use Magento\MagentoCloud\Config\SearchEngine;
use Magento\MagentoCloud\Config\Stage\DeployInterface;
use Magento\MagentoCloud\Config\Validator;
use Magento\MagentoCloud\Config\Validator\ResultFactory;
use Magento\MagentoCloud\Config\ValidatorException;
use Magento\MagentoCloud\Config\ValidatorInterface;
use Magento\MagentoCloud\Package\MagentoVersion;
use Magento\MagentoCloud\Service\ElasticSearch;

/**
* Validates SEARCH_CONFIGURATION variable
Expand Down Expand Up @@ -74,7 +74,7 @@ public function validate(): Validator\ResultInterface

if ($this->magentoVersion->isGreaterOrEqual('2.4.0')
&& isset($searchConfig['engine'])
&& $searchConfig['engine'] != ElasticSearch::ENGINE_NAME
&& $searchConfig['engine'] == SearchEngine::ENGINE_MYSQL
) {
return $this->resultFactory->errorByCode(Error::DEPLOY_WRONG_SEARCH_ENGINE);
}
Expand Down
14 changes: 14 additions & 0 deletions src/Test/Unit/Config/Validator/Deploy/SearchConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,20 @@ public function validateDataProvider(): array
Success::class,
true
],
[
[
'engine' => 'elasticsearch7',
],
Success::class,
true
],
[
[
'engine' => 'elasticsuite',
],
Success::class,
true
],
];
}

Expand Down

0 comments on commit 2e370d4

Please sign in to comment.