Sha256: cfeca149a68e054a9ae72a2c9e04351166fb56d41e6d1084632edc635b319a99

Contents?: true

Size: 1.47 KB

Versions: 34

Compression:

Stored size: 1.47 KB

Contents

require 'spec_helper'

include Serverspec::Helper::Solaris11

describe host('127.0.0.1') do
  it { should be_resolvable }
  its(:command) { should eq "getent hosts 127.0.0.1" }
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') }
  its(:command) { should eq "grep -w -- 127.0.0.1 /etc/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') }
  its(:command) { should eq "nslookup -timeout=1 127.0.0.1" }
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 }
  its(:command) { should eq "ping -n 127.0.0.1 5" }
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) }
  its(:command) { should eq "ping -n 127.0.0.1 1" }
end

describe host('127.0.0.1') do
  it { should be_reachable.with(:proto => "tcp", :port => 22, :timeout=> 1) }
  its(:command) { should eq "nc -vvvvzt -w 1 127.0.0.1 22" }
end

describe host('127.0.0.1') do
  it { should be_reachable.with(:proto => "udp", :port => 53, :timeout=> 1) }
  its(:command) { should eq "nc -vvvvzu -w 1 127.0.0.1 53" }
end

describe host('invalid-host') do
  it { should_not be_reachable.with(:proto => "udp", :port => 53, :timeout=> 1) }
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
serverspec-0.11.5 spec/solaris11/host_spec.rb
serverspec-0.11.4 spec/solaris11/host_spec.rb
serverspec-0.11.3 spec/solaris11/host_spec.rb
serverspec-0.11.2 spec/solaris11/host_spec.rb
serverspec-0.9.4 spec/solaris11/host_spec.rb
serverspec-0.9.3 spec/solaris11/host_spec.rb
serverspec-0.9.2 spec/solaris11/host_spec.rb
serverspec-0.9.1 spec/solaris11/host_spec.rb
serverspec-0.9.0 spec/solaris11/host_spec.rb
serverspec-0.8.1 spec/solaris11/host_spec.rb
serverspec-0.8.0 spec/solaris11/host_spec.rb
serverspec-0.7.13 spec/solaris11/host_spec.rb
serverspec-0.7.12 spec/solaris11/host_spec.rb
serverspec-0.7.11 spec/solaris11/host_spec.rb
serverspec-0.7.10 spec/solaris11/host_spec.rb
serverspec-0.7.9 spec/solaris11/host_spec.rb
serverspec-0.7.8 spec/solaris11/host_spec.rb
serverspec-0.7.7 spec/solaris11/host_spec.rb
serverspec-0.7.6 spec/solaris11/host_spec.rb
serverspec-0.7.5 spec/solaris11/host_spec.rb