Sha256: e3db2148840063a0b112ffda8997b13c31d6ef1ead747fd875e26b3032c07857

Contents?: true

Size: 310 Bytes

Versions: 4

Compression:

Stored size: 310 Bytes

Contents

class Sysdig::GetAlert < Sysdig::Request
  def real(alert_id)
    service.request(
      :method => :get,
      :path   => File.join("/api/alerts", alert_id.to_s),
    )
  end

  def mock(alert_id)
    service.response(
      :body => { "alert" => service.data[:alerts].fetch(alert_id.to_i) },
    )
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sysdig-0.3.1 lib/sysdig/get_alert.rb
sysdig-0.3.0 lib/sysdig/get_alert.rb
sysdig-0.2.4 lib/sysdig/get_alert.rb
sysdig-0.2.3 lib/sysdig/get_alert.rb