Sha256: 131d5c824e1a6e8ff5967f5834efc467ace883c897863396fac975341f8e7ed4

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

require_relative '../charrington_spec_helper'

describe LogStash::Outputs::Charrington do
  describe 'when initializing' do
    it 'shouldn\'t register without a config' do
      expect do
        LogStash::Plugin.lookup('output', 'charrington').new
      end.to raise_error(LogStash::ConfigurationError)
    end
  end

  describe 'integration tests' do
    config <<-CONFIG
    input {
      generator {
        message => '{"id": "abc", "app_name": "Web App", "event": "Hi - Dan"}'
        codec => 'json'
        count => 1
      }
    }

    output {
      charrington {
        connection_string => 'jdbc:postgresql://localhost:5432/winston?user=postgres&password=postgres'
        driver_jar_path => '/projects/logstash-output-charrington/vendor/postgresql-42.2.5.jar'
        schema => 'dea'
      }
    }
    CONFIG

    agent do
      puts "IT'S WORKING!!!!!"
    end
  end

  # context 'running' do
  #   it 'should transform some JSON' do
  #     transformed = Charrington::Transform.call({"a" => 1})
  #     puts transformed
  #   end
  # end
end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
logstash-output-charrington-0.2.0 spec/outputs/charrington_spec.rb