Sha256: d29617e4d272453924ebb5146f9f9e26b43b9434db7435abd3f97c5a95cf7805

Contents?: true

Size: 293 Bytes

Versions: 7

Compression:

Stored size: 293 Bytes

Contents

RSpec::Matchers.define :have_iptables_rule do |rule|
  match do |iptables|
    ret = ssh_exec(commands.check_iptables_rule(rule, @table, @chain))
    ret[:exit_code] == 0
  end
  chain :with_table do |table|
    @table = table
  end
  chain :with_chain do |chain|
    @chain = chain
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
serverspec-0.1.6 lib/serverspec/matchers/have_iptables_rule.rb
serverspec-0.1.5 lib/serverspec/matchers/have_iptables_rule.rb
serverspec-0.1.4 lib/serverspec/matchers/have_iptables_rule.rb
serverspec-0.1.3 lib/serverspec/matchers/have_iptables_rule.rb
serverspec-0.1.2 lib/serverspec/matchers/have_iptables_rule.rb
serverspec-0.1.1 lib/serverspec/matchers/have_iptables_rule.rb
serverspec-0.1.0 lib/serverspec/matchers/have_iptables_rule.rb