| 1 | # Licensed to Elasticsearch B.V under one or more agreements. | ||
| 2 | # Elasticsearch B.V licenses this file to you under the Apache 2.0 License. | ||
| 3 | # See the LICENSE file in the project root for more information | ||
| 4 | |||
| 5 | package Search::Elasticsearch::Client::2_0::TestServer; | ||
| 6 | $Search::Elasticsearch::Client::2_0::TestServer::VERSION = '7.30_1'; # TRIAL | ||
| 7 | |||
| 8 | $Search::Elasticsearch::Client::2_0::TestServer::VERSION = '7.301'; | ||
| 9 | use strict; | ||
| 10 | use warnings; | ||
| 11 | |||
| 12 | #=================================== | ||
| 13 | sub command_line { | ||
| 14 | #=================================== | ||
| 15 | my ( $class, $ts, $pid_file, $dir, $transport, $http ) = @_; | ||
| 16 | |||
| 17 | return ( | ||
| 18 | $ts->es_home . '/bin/elasticsearch', | ||
| 19 | '-p', | ||
| 20 | $pid_file->filename, | ||
| 21 | map {"-Des.$_"} ( | ||
| 22 | 'path.data=' . $dir, | ||
| 23 | 'network.host=127.0.0.1', | ||
| 24 | 'cluster.name=es_test', | ||
| 25 | 'discovery.zen.ping_timeout=1s', | ||
| 26 | 'discovery.zen.ping.multicast.enabled=false', | ||
| 27 | 'discovery.zen.ping.unicast.hosts=127.0.0.1:' . $ts->es_port, | ||
| 28 | 'transport.tcp.port=' . $transport, | ||
| 29 | 'http.port=' . $http, | ||
| 30 | @{ $ts->conf } | ||
| 31 | ) | ||
| 32 | ); | ||
| 33 | } | ||
| 34 | |||
| 35 | 1 | ||
| 36 | |||
| 37 | # ABSTRACT: Client-specific backend for Search::Elasticsearch::TestServer | ||
| 38 | |||
| 39 | __END__ |