Sha256: 43db68e0fb6ef3cf19ae628033bd7038c95c903bfbd7b9d3aae2cfa0ff0f130d
Contents?: true
Size: 1.22 KB
Versions: 19
Compression:
Stored size: 1.22 KB
Contents
require_relative "../../../spec/amazon_es_spec_helper" describe "outputs/amazon_es" do describe "http client create" do require "logstash/outputs/amazon_es" require "elasticsearch" let(:options) { { "index" => "my-index", "hosts" => "localhost", "path" => "some-path" } } let(:eso) {LogStash::Outputs::AmazonES.new(options)} let(:manticore_host) { eso.client.send(:client).transport.options[:hosts].first } around(:each) do |block| thread = eso.register block.call() thread.kill() end describe "with path" do it "should properly create a URI with the path" do expect(eso.path).to eql(options["path"]) end it "should properly set the path on the HTTP client" do expect(manticore_host).to include("/" + options["path"]) end context "with extra slashes" do let(:path) { "/slashed-path/ "} let(:eso) { LogStash::Outputs::AmazonES.new(options.merge("path" => "/some-path/")) } it "should properly set the path on the HTTP client without adding slashes" do expect(manticore_host).to include(options["path"]) end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems