Sha256: 5e9658cde4c8b621044ed654616c0ffaaffdd47376bbb7d6ccab77590aae1f27

Contents?: true

Size: 875 Bytes

Versions: 17

Compression:

Stored size: 875 Bytes

Contents

require "logstash/devutils/rspec/spec_helper"
require "logstash/outputs/elasticsearch/http_client"

describe LogStash::Outputs::ElasticSearch::HttpClient::ManticoreAdapter do
  let(:logger) { Cabin::Channel.get }
  let(:options) { {} }

  subject { described_class.new(logger, options) }

  it "should raise an exception if requests are issued after close" do
    subject.close
    expect { subject.perform_request("http://localhost:9200", :get, '/') }.to raise_error(::Manticore::ClientStoppedException)
  end

  it "should implement host unreachable exceptions" do
    expect(subject.host_unreachable_exceptions).to be_a(Array)
  end

  describe "integration specs", :integration => true do
    it "should perform correct tests without error" do
      resp = subject.perform_request("http://localhost:9200", :get, "/")
      expect(resp.code).to eql(200)
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
logstash-output-elasticsearch-5.4.1-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-5.4.0-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-5.3.5-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-5.3.4-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-5.2.1-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-5.3.3-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-5.3.2-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-5.3.1-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-5.3.0-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-5.2.0-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-5.1.2-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-5.1.1-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-5.1.0-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-4.1.3-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-4.1.2-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-4.1.1-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb
logstash-output-elasticsearch-4.1.0-java spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb