diff --git a/qa/integration/specs/dlq_spec.rb b/qa/integration/specs/dlq_spec.rb index b76cc997ed4..965b39d0c07 100644 --- a/qa/integration/specs/dlq_spec.rb +++ b/qa/integration/specs/dlq_spec.rb @@ -27,7 +27,7 @@ # template with an ip field let(:template) { serverless? ? { "index_patterns": ["te*"], "template": {"mappings": { "properties": { "ip": { "type": "ip" }}}} } : { "index_patterns": ["te*"], "mappings": { "properties": { "ip": { "type": "ip" }}}} } - let(:template_api) { serverless? ? "_index_template": "_template" } + let(:template_api) { serverless? ? "_index_template" : "_template" } # a message that is incompatible with the template let(:message) { {"message": "hello", "ip": 1}.to_json } diff --git a/x-pack/lib/license_checker/license_manager.rb b/x-pack/lib/license_checker/license_manager.rb index 568584ef7ee..c56061cc942 100644 --- a/x-pack/lib/license_checker/license_manager.rb +++ b/x-pack/lib/license_checker/license_manager.rb @@ -46,6 +46,7 @@ def fetch_cluster_info def build_flavor @cluster_info&.dig('version', 'build_flavor') end + def serverless? build_flavor == 'serverless' end diff --git a/x-pack/spec/config_management/elasticsearch_source_spec.rb b/x-pack/spec/config_management/elasticsearch_source_spec.rb index cf69674f9e8..285c520a229 100644 --- a/x-pack/spec/config_management/elasticsearch_source_spec.rb +++ b/x-pack/spec/config_management/elasticsearch_source_spec.rb @@ -780,5 +780,4 @@ expect { subject.get_es_version }.to raise_error(LogStash::ConfigManagement::ElasticsearchSource::RemoteConfigError) end end - end diff --git a/x-pack/spec/license_checker/license_reader_spec.rb b/x-pack/spec/license_checker/license_reader_spec.rb index bce2cd0d812..1e9f9caba60 100644 --- a/x-pack/spec/license_checker/license_reader_spec.rb +++ b/x-pack/spec/license_checker/license_reader_spec.rb @@ -166,7 +166,6 @@ expect(subject.fetch_cluster_info).to eq({}) end end - end it "builds ES client" do diff --git a/x-pack/spec/support/helpers.rb b/x-pack/spec/support/helpers.rb index 577d2a7719a..4d7fa45fc54 100644 --- a/x-pack/spec/support/helpers.rb +++ b/x-pack/spec/support/helpers.rb @@ -106,4 +106,4 @@ def cluster_info(version = LOGSTASH_VERSION, build_flavour = "default") "minimum_wire_compatibility_version" => "7.17.0", "minimum_index_compatibility_version" => "7.0.0"}, "tagline" => "You Know, for Search"} -end \ No newline at end of file +end