Sha256: a286c391743c96abed3997e9de6d0163626b521dcc7c090e1d34f6e2b622ba90
Contents?: true
Size: 1.29 KB
Versions: 5
Compression:
Stored size: 1.29 KB
Contents
require 'spec_helper' set :os, :family => 'base' describe commands.command_class('host').create do it { should be_an_instance_of(Specinfra::Command::Base::Host) } end describe host('127.0.0.1') do it { should be_resolvable } end describe host('invalid-name') do it { should_not be_resolvable } end describe host('127.0.0.1') do it { should be_resolvable.by('hosts') } end describe host('invalid-name') do it { should_not be_resolvable.by('hosts') } end describe host('127.0.0.1') do it { should be_resolvable.by('dns') } end describe host('invalid-name') do it { should_not be_resolvable.by('dns') } end describe host('127.0.0.1') do it { should be_reachable } end describe host('invalid-host') do it { should_not be_reachable } end describe host('127.0.0.1') do it { should be_reachable.with(:proto => "icmp", :timeout=> 1) } end describe host('127.0.0.1') do it { should be_reachable.with(:proto => "tcp", :port => 22, :timeout=> 1) } end describe host('127.0.0.1') do it { should be_reachable.with(:proto => "udp", :port => 53, :timeout=> 1) } end describe host('invalid-host') do it { should_not be_reachable.with(:proto => "udp", :port => 53, :timeout=> 1) } end describe host('example.jp') do let(:stdout) { "1.2.3.4\r\n" } its(:ipaddress) { should eq '1.2.3.4' } end
Version data entries
5 entries across 5 versions & 1 rubygems