Sha256: 4fcdb75abbde7ced63cc41f7df4f2a4223f08ac84ad7b489dabe4fa891b295c1

Contents?: true

Size: 1.41 KB

Versions: 34

Compression:

Stored size: 1.41 KB

Contents

require 'spec_helper'

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

describe get_command(:check_interface_has_ipv6_address, 'vtnet0', '2001:0db8:bd05:01d2:288a:1fc0:0001:10ee') do
  it { should eq "ifconfig vtnet0 inet6 | grep 'inet6 2001:0db8:bd05:01d2:288a:1fc0:0001:10ee '" }
end

describe get_command(:check_interface_has_ipv6_address, 'vtnet0', '2001:0db8:bd05:01d2:288a:1fc0:0001:10ee/64') do
  it { should eq "ifconfig vtnet0 inet6 | grep 'inet6 2001:0db8:bd05:01d2:288a:1fc0:0001:10ee prefixlen 64'" }
end

describe get_command(:check_interface_has_ipv6_address, 'vtnet0', 'fe80::5054:ff:fe01:10ee/64') do
  it { should eq "ifconfig vtnet0 inet6 | grep 'inet6 fe80::5054:ff:fe01:10ee%vtnet0 prefixlen 64'" }
end

describe get_command(:check_interface_has_ipv6_address, 'vtnet0', 'fe80::5054:ff:fe01:10ee') do
  it { should eq "ifconfig vtnet0 inet6 | grep 'inet6 fe80::5054:ff:fe01:10ee%vtnet0 '" }
end

describe get_command(:check_interface_has_ipv4_address, 'vtnet0', '192.168.0.123') do
  it { should eq "ifconfig vtnet0 inet | grep 'inet 192\\.168\\.0\\.123 '" }
end

describe get_command(:check_interface_has_ipv4_address, 'vtnet0', '192.168.0.123/24') do
  it { should eq "ifconfig vtnet0 inet | grep 'inet 192\\.168\\.0\\.123 '" }
end

describe get_command(:get_interface_link_state, 'vtnet0') do
  it { should eq %Q{ifconfig -u vtnet0 2>&1 | awk -v s=up '/status:/ && $2 != "active" { s="down" }; END {print s}'} }
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
specinfra-2.44.4 spec/command/freebsd/interface_spec.rb
specinfra-2.44.3 spec/command/freebsd/interface_spec.rb
specinfra-2.44.2 spec/command/freebsd/interface_spec.rb
specinfra-2.44.1 spec/command/freebsd/interface_spec.rb
specinfra-2.44.0 spec/command/freebsd/interface_spec.rb
specinfra-2.43.11 spec/command/freebsd/interface_spec.rb
specinfra-2.43.10 spec/command/freebsd/interface_spec.rb
specinfra-2.43.9 spec/command/freebsd/interface_spec.rb
specinfra-2.43.8 spec/command/freebsd/interface_spec.rb
specinfra-2.43.7 spec/command/freebsd/interface_spec.rb
specinfra-2.43.6 spec/command/freebsd/interface_spec.rb
specinfra-2.43.5 spec/command/freebsd/interface_spec.rb
specinfra-2.43.4 spec/command/freebsd/interface_spec.rb
specinfra-2.43.3 spec/command/freebsd/interface_spec.rb