Sha256: d522eeaa55a92e637479665129324970401b0a394aa2524d6e4881ce8d1568b1

Contents?: true

Size: 350 Bytes

Versions: 5

Compression:

Stored size: 350 Bytes

Contents

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

  def mock(identity)
    service.data[:alerts].fetch(identity)
    service.data[:alerts].delete(identity)

    service.response(
      :status => 204,
    )
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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