Sha256: 9634c476f38deb58c9cb139c6805939af55e455eb878575a19948b5678de76b4

Contents?: true

Size: 558 Bytes

Versions: 8

Compression:

Stored size: 558 Bytes

Contents

require "logstash/devutils/rspec/spec_helper"
require "ftw"
require 'elasticsearch'

module ESHelper
  def get_host_port
    "127.0.0.1:9200"
  end

  def get_client
    Elasticsearch::Client.new(:hosts => [get_host_port])
  end

  def self.es_version_satisfies?(*requirement)
    es_version = RSpec.configuration.filter[:es_version] || ENV['ES_VERSION']
    es_release_version = Gem::Version.new(es_version).release
    Gem::Requirement.new(requirement).satisfied_by?(es_release_version)
  end
end

RSpec.configure do |config|
  config.include ESHelper
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
logstash-output-elasticsearch-7.4.3-java spec/es_spec_helper.rb
logstash-output-elasticsearch-9.1.1-java spec/es_spec_helper.rb
logstash-output-elasticsearch-9.0.3-java spec/es_spec_helper.rb
logstash-output-elasticsearch-9.0.2-java spec/es_spec_helper.rb
logstash-output-elasticsearch-9.0.0-java spec/es_spec_helper.rb
logstash-output-elasticsearch-7.4.2-java spec/es_spec_helper.rb
logstash-output-elasticsearch-8.2.2-java spec/es_spec_helper.rb
logstash-output-elasticsearch-8.2.0-java spec/es_spec_helper.rb