Skip to content

Commit c9f0a73

Browse files
authored
Removes the fixed version number and uses plugin version instead. (#254)
1 parent 021e8c7 commit c9f0a73

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spec/unit/elastic_integration_spec.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@
7878
let(:registered_plugin) { plugin.tap(&:register) }
7979
after(:each) { plugin.close }
8080

81-
let(:connected_es_version_info) { {'number' => '8.17.0', 'build_flavor' => 'default'} }
81+
let(:version) { LogStash::Filters::ElasticIntegration::VERSION }
82+
83+
# assuming that the plugin is connected to the ES with the same version
84+
# see the "plugin vs connected ES versions compatibility" unit test when versions differ
85+
let(:connected_es_version_info) { {'number' => version, 'build_flavor' => 'default'} }
8286

8387
shared_examples "validate `ssl_enabled`" do
8488
it "enables SSL" do
@@ -733,7 +737,6 @@
733737

734738
describe "plugin vs connected ES versions compatibility" do
735739
let(:config) { super().merge("hosts" => %w[127.0.0.2:9300]) }
736-
let(:version) { LogStash::Filters::ElasticIntegration::VERSION }
737740
let(:plugin_major_version) { version.split('.').first.to_i }
738741
let(:plugin_minor_version) { version.split('.')[1].to_i }
739742
let(:base_message) { "This #{version} version of plugin embedded Ingest node components from Elasticsearch #{plugin_major_version}.#{plugin_minor_version}" }

0 commit comments

Comments
 (0)