Sha256: 435d106a502df60ff507ac283e100678f185655ee3defc884d664ee67d52bcbd

Contents?: true

Size: 1019 Bytes

Versions: 44

Compression:

Stored size: 1019 Bytes

Contents

require 'spec_helper'

set :os, :family => 'base'

describe host('127.0.0.1') do
  it { should be_resolvable }
end

describe host('127.0.0.1') do
  it { should be_resolvable.by('hosts') }
end

describe host('127.0.0.1') do
  it { should be_resolvable.by('dns') }
end

describe host('127.0.0.1') do
  it { should 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('example.jp') do
  let(:stdout) { "1.2.3.4\r\n" }
  its(:ipaddress) { should eq '1.2.3.4' }
end

describe host('example.jp') do
  let(:stdout) { "1.2.3.4\r\n" }
  its(:ipv4_address) { should match(/^[\d.]+$/) }
end

describe host('example.jp') do
  let(:stdout) { "2001:db8::1234\r\n" }
  its(:ipv6_address) { should match(/^[a-f\d:]+$/i) }
end

Version data entries

44 entries across 44 versions & 3 rubygems

Version Path
serverspec-2.42.3 spec/type/base/host_spec.rb
serverspec-2.42.2 spec/type/base/host_spec.rb
serverspec-2.42.1 spec/type/base/host_spec.rb
serverspec-cem-acpt-2.42.0 spec/type/base/host_spec.rb
serverspec-2.42.0 spec/type/base/host_spec.rb
serverspec-2.41.8 spec/type/base/host_spec.rb
serverspec-2.41.7 spec/type/base/host_spec.rb
serverspec-2.41.6 spec/type/base/host_spec.rb
serverspec-2.41.5 spec/type/base/host_spec.rb
serverspec-2.41.4 spec/type/base/host_spec.rb
serverspec-ruby19-2.24.3 spec/type/base/host_spec.rb
serverspec-2.41.3 spec/type/base/host_spec.rb
serverspec-2.41.2 spec/type/base/host_spec.rb
serverspec-2.41.1 spec/type/base/host_spec.rb
serverspec-2.41.0 spec/type/base/host_spec.rb
serverspec-2.40.0 spec/type/base/host_spec.rb
serverspec-2.39.2 spec/type/base/host_spec.rb
serverspec-2.39.1 spec/type/base/host_spec.rb
serverspec-2.39.0 spec/type/base/host_spec.rb
serverspec-2.38.1 spec/type/base/host_spec.rb