Sha256: 1469250ab40c7ef6eaa21dc40e8585bcad97da67c2b3bd0ce19f5f9d4206fc31

Contents?: true

Size: 862 Bytes

Versions: 14

Compression:

Stored size: 862 Bytes

Contents

require "logstash/devutils/rspec/spec_helper"
require "logstash/inputs/cloudwatch"

describe LogStash::Inputs::CloudWatch, :integration => true do

  let(:settings)  {  { "access_key_id" => ENV['AWS_ACCESS_KEY_ID'],
                       "secret_access_key" => LogStash::Util::Password.new(ENV['AWS_SECRET_ACCESS_KEY']),
                       "region" => ENV["AWS_REGION"] || "us-east-1",
                       "namespace" => "AWS/S3",
                       'filters' => { "BucketName" => "*"},
                       'metrics' => ["BucketSizeBytes","NumberOfObjects"]

  }}

  def metrics_for(settings)
    cw = LogStash::Inputs::CloudWatch.new(settings)
    cw.register
    cw.send('metrics_for', settings['namespace'])
  end

  #
  it "should not raise a type error when using a password" do
    expect{metrics_for(settings)}.not_to raise_error
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
logstash-integration-aws-7.2.1-java spec/integration/cloudwatch_spec.rb
logstash-integration-aws-7.2.0-java spec/integration/cloudwatch_spec.rb
logstash-integration-aws-7.1.8-java spec/integration/cloudwatch_spec.rb
logstash-integration-aws-7.1.7-java spec/integration/cloudwatch_spec.rb
logstash-integration-aws-7.1.6-java spec/integration/cloudwatch_spec.rb
logstash-integration-aws-7.1.5-java spec/integration/cloudwatch_spec.rb
logstash-integration-aws-7.1.4-java spec/integration/cloudwatch_spec.rb
logstash-integration-aws-7.1.3-java spec/integration/cloudwatch_spec.rb
logstash-integration-aws-7.1.2-java spec/integration/cloudwatch_spec.rb
logstash-integration-aws-7.1.1-java spec/integration/cloudwatch_spec.rb
logstash-integration-aws-7.1.0 spec/integration/cloudwatch_spec.rb
logstash-integration-aws-7.0.1 spec/integration/cloudwatch_spec.rb
logstash-integration-aws-7.0.0 spec/integration/cloudwatch_spec.rb
logstash-integration-aws-0.1.0.pre spec/integration/cloudwatch_spec.rb