File tree Expand file tree Collapse file tree 5 files changed +64
-0
lines changed Expand file tree Collapse file tree 5 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 18
18
'port ' => '6379 '
19
19
]
20
20
],
21
+ 'elasticsearch ' => [
22
+ [
23
+ 'host ' => 'elasticsearch ' ,
24
+ 'port ' => '9200 ' ,
25
+ ],
26
+ ],
21
27
'rabbitmq ' => [
22
28
[
23
29
'host ' => 'rabbitmq ' ,
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ public function build(): array
95
95
'services ' => [
96
96
'varnish ' => $ this ->serviceFactory ->create (ServiceFactory::SERVICE_VARNISH )->get (),
97
97
'redis ' => $ this ->serviceFactory ->create (ServiceFactory::SERVICE_REDIS )->get (),
98
+ 'elasticsearch ' => $ this ->serviceFactory ->create (ServiceFactory::SERVICE_ELASTICSEARCH )->get (),
98
99
'rabbitmq ' => $ this ->serviceFactory ->create (ServiceFactory::SERVICE_RABBITMQ )->get (),
99
100
'fpm ' => $ this ->getFpmService (),
100
101
/** For backward compatibility. */
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \MagentoCloud \Docker \Service ;
7
+
8
+ /**
9
+ * @inheritdoc
10
+ */
11
+ class ElasticSearchService implements ServiceInterface
12
+ {
13
+ /**
14
+ * @inheritdoc
15
+ */
16
+ public function get (): array
17
+ {
18
+ return [
19
+ 'image ' => 'magento/magento-cloud-docker-elasticsearch:5.2 ' ,
20
+ ];
21
+ }
22
+ }
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class ServiceFactory
14
14
{
15
15
const SERVICE_VARNISH = 'varnish ' ;
16
16
const SERVICE_REDIS = 'redis ' ;
17
+ const SERVICE_ELASTICSEARCH = 'elasticsearch ' ;
17
18
const SERVICE_RABBITMQ = 'rabbitmq ' ;
18
19
19
20
/**
@@ -22,6 +23,7 @@ class ServiceFactory
22
23
private static $ map = [
23
24
self ::SERVICE_VARNISH => VarnishService::class,
24
25
self ::SERVICE_REDIS => RedisService::class,
26
+ self ::SERVICE_ELASTICSEARCH => ElasticSearchService::class,
25
27
self ::SERVICE_RABBITMQ => RabbitMqService::class,
26
28
];
27
29
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \MagentoCloud \Test \Unit \Docker \Service ;
7
+
8
+ use Magento \MagentoCloud \Docker \Service \ElasticSearchService ;
9
+ use PHPUnit \Framework \TestCase ;
10
+
11
+ /**
12
+ * @inheritdoc
13
+ */
14
+ class ElasticSearchServiceTest extends TestCase
15
+ {
16
+ /**
17
+ * @var ElasticSearchService
18
+ */
19
+ private $ service ;
20
+
21
+ /**
22
+ * @inheritdoc
23
+ */
24
+ protected function setUp ()
25
+ {
26
+ $ this ->service = new ElasticSearchService ();
27
+ }
28
+
29
+ public function testGet ()
30
+ {
31
+ $ this ->assertSame (['image ' => 'magento/magento-cloud-docker-elasticsearch:5.2 ' ], $ this ->service ->get ());
32
+ }
33
+ }
You can’t perform that action at this time.
0 commit comments