Skip to content

Commit e359936

Browse files
committed
Fix wrong opensearch usage
Update wrong usage of opensearch and remove versions. Signed-off-by: Vijayan Balasubramanian <[email protected]>
1 parent 9925cee commit e359936

File tree

7 files changed

+9
-83
lines changed

7 files changed

+9
-83
lines changed

lib/logstash/outputs/opensearch.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class LogStash::Outputs::OpenSearch < LogStash::Outputs::Base
137137

138138
config :document_type,
139139
:validate => :string,
140-
:deprecated => "Document types are being deprecated in OpenSearch 6.0, and removed entirely in 7.0. You should avoid this feature"
140+
:deprecated => "Document types are removed entirely. You should avoid this feature"
141141

142142
# From Logstash 1.3 onwards, a template is applied to Elasticsearch during
143143
# Logstash's startup if one with the name `template_name` does not already exist.

lib/logstash/plugin_mixins/opensearch/api_configs.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
module LogStash; module PluginMixins; module OpenSearch
1111
module APIConfigs
1212

13-
# This module defines common options that can be reused by alternate OpenSearch output plugins such as the OpenSearch_data_streams output.
13+
# This module defines common options that can be reused by alternate OpenSearch output plugins.
1414

1515
DEFAULT_HOST = ::LogStash::Util::SafeURI.new("//127.0.0.1")
1616

@@ -129,7 +129,7 @@ module APIConfigs
129129
# See https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.html#setValidateAfterInactivity(int)[these docs for more info]
130130
:validate_after_inactivity => { :validate => :number, :default => 10000 },
131131

132-
# Enable gzip compression on requests. Note that response compression is on by default for OpenSearch v5.0 and beyond
132+
# Enable gzip compression on requests.
133133
:http_compression => { :validate => :boolean, :default => false },
134134

135135
# Custom Headers to send on each request to OpenSearch nodes

lib/logstash/plugin_mixins/opensearch/common.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
module LogStash; module PluginMixins; module OpenSearch
1313
module Common
1414

15-
# This module defines common methods that can be reused by alternate elasticsearch output plugins such as the OpenSearch_data_streams output.
15+
# This module defines common methods that can be reused by alternate opensearch output plugins.
1616

1717
attr_reader :hosts
1818

scripts/logstash-run.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ wait_for_es() {
1818
if [[ "$INTEGRATION" != "true" ]]; then
1919
bundle exec rspec -fd spec/unit -t ~integration
2020
else
21-
echo "Waiting for elasticsearch to respond..."
22-
ES_VERSION=$(wait_for_es)
23-
echo "Elasticsearch $VERSION is Up!"
21+
echo "Waiting for cluster to respond..."
22+
VERSION=$(wait_for_es)
23+
echo "Integration test cluster $VERSION is Up!"
2424
bundle exec rspec -fd --tag integration --tag update_tests:painless --tag version:$VERSION spec/integration
2525
fi

spec/fixtures/_nodes/7x.json

Lines changed: 0 additions & 74 deletions
This file was deleted.
File renamed without changes.

spec/integration/outputs/sniffer_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949

5050
describe("Complex sniff parsing") do
5151
before(:each) do
52-
response_double = double("_nodes/http", body: File.read("spec/fixtures/_nodes/7x.json"))
53-
allow(subject).to receive(:perform_request).and_return([nil, { version: "7.0" }, response_double])
52+
response_double = double("_nodes/http", body: File.read("spec/fixtures/_nodes/nodes.json"))
53+
allow(subject).to receive(:perform_request).and_return([nil, { version: "any" }, response_double])
5454
subject.start
5555
end
5656

0 commit comments

Comments
 (0)