Sha256: 184218bb75eebe83c9bc83d578c6fbd8770684951c7f5c7139a85ee4e42878af

Contents?: true

Size: 589 Bytes

Versions: 5

Compression:

Stored size: 589 Bytes

Contents

require File.dirname(__FILE__) + '/helper'

class TestStatsd < Minitest::Test
  def setup
    @statsd = God::Contacts::Statsd.new
  end

  def test_exists
    God::Contacts::Statsd
  end

  def test_notify
    [
        'cpu out of bounds',
        'memory out of bounds',
        'process is flapping'
    ].each do |event_type|
      ::Statsd.any_instance.expects(:increment).with("god.#{event_type.gsub(/\s/, '_')}.127_0_0_1.myapp-thin-1234")
      @statsd.notify("myapp-thin-1234 [trigger] #{event_type}", Time.now, 'some priority', 'and some category', '127.0.0.1')
    end
  end
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
resurrected_god-0.14.0 test/test_statsd.rb
mcproc-2016.2.20 test/test_statsd.rb
god-0.13.7 test/test_statsd.rb
god-0.13.6 test/test_statsd.rb
god-0.13.5 test/test_statsd.rb