From 93e04ab6f8d01c82ab1208d318c20b7d2cd1ad2f Mon Sep 17 00:00:00 2001 From: Mashhur <99575341+mashhurs@users.noreply.github.com> Date: Mon, 27 Jan 2025 16:22:59 -0800 Subject: [PATCH] Removes the fixed version number and uses plugin version instead. (#254) (cherry picked from commit c9f0a7333e1edf02dc20683273682a3338e7223f) --- spec/unit/elastic_integration_spec.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/unit/elastic_integration_spec.rb b/spec/unit/elastic_integration_spec.rb index 9f1d6631..672795ff 100644 --- a/spec/unit/elastic_integration_spec.rb +++ b/spec/unit/elastic_integration_spec.rb @@ -78,7 +78,11 @@ let(:registered_plugin) { plugin.tap(&:register) } after(:each) { plugin.close } - let(:connected_es_version_info) { {'number' => '8.17.0', 'build_flavor' => 'default'} } + let(:version) { LogStash::Filters::ElasticIntegration::VERSION } + + # assuming that the plugin is connected to the ES with the same version + # see the "plugin vs connected ES versions compatibility" unit test when versions differ + let(:connected_es_version_info) { {'number' => version, 'build_flavor' => 'default'} } shared_examples "validate `ssl_enabled`" do it "enables SSL" do @@ -733,7 +737,6 @@ describe "plugin vs connected ES versions compatibility" do let(:config) { super().merge("hosts" => %w[127.0.0.2:9300]) } - let(:version) { LogStash::Filters::ElasticIntegration::VERSION } let(:plugin_major_version) { version.split('.').first.to_i } let(:plugin_minor_version) { version.split('.')[1].to_i } let(:base_message) { "This #{version} version of plugin embedded Ingest node components from Elasticsearch #{plugin_major_version}.#{plugin_minor_version}" }