File: port_spec.rb

package info (click to toggle)
ruby-specinfra 2.94.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,448 kB
  • sloc: ruby: 10,538; sh: 4; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 514 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'spec_helper'

property[:os] = nil
set :os, :family => 'openbsd'

describe get_command(:check_port_is_listening, '80') do
  it { should eq "netstat -nat -f inet | egrep '((tcp|udp).*.80.*LISTEN$)'" }
end

describe get_command(:check_port_is_listening, '22', :protocol => 'tcp') do
  it { should eq "netstat -nat -f inet | egrep '(tcp.*.22.*LISTEN$)'" }
end

describe get_command(:check_port_is_listening, '514', :protocol => 'udp') do
  it { should eq "netstat -nat -f inet | egrep '(udp.*.514.*$)'" }
end