Sha256: a96635152849dd519bf22636e4ff175bfa327bd259a7742828d54e660ae0cf46

Contents?: true

Size: 623 Bytes

Versions: 19

Compression:

Stored size: 623 Bytes

Contents

require 'spec_helper'

set :os, :family => 'linux'

describe interface('eth0') do
  let(:stdout) { '1000' }
  its(:speed) { should eq 1000 }
end

describe interface('eth0') do
  it { should have_ipv4_address('192.168.10.10') }
end

describe interface('eth0') do
  it { should have_ipv4_address('192.168.10.10/24') }
end

describe interface('eth0') do
  it { should have_ipv6_address('2001:0db8:bd05:01d2:288a:1fc0:0001:10ee') }
end

describe interface('eth0') do
  let(:stdout) { 'up' }
  it { should be_up }
end

describe interface('invalid-interface') do
  let(:stdout) { '1000' }
  its(:speed) { should_not eq 100 }
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
serverspec-ruby19-2.24.3 spec/type/linux/interface_spec.rb
serverspec-2.27.0 spec/type/linux/interface_spec.rb
serverspec-2.26.0 spec/type/linux/interface_spec.rb
serverspec-2.25.0 spec/type/linux/interface_spec.rb
serverspec-2.24.3 spec/type/linux/interface_spec.rb
serverspec-2.24.2 spec/type/linux/interface_spec.rb
serverspec-2.24.1 spec/type/linux/interface_spec.rb
serverspec-2.24.0 spec/type/linux/interface_spec.rb
serverspec-2.23.1 spec/type/linux/interface_spec.rb
serverspec-2.23.0 spec/type/linux/interface_spec.rb
serverspec-2.22.0 spec/type/linux/interface_spec.rb
serverspec-2.21.1 spec/type/linux/interface_spec.rb
serverspec-2.21.0 spec/type/linux/interface_spec.rb
serverspec-2.20.0 spec/type/linux/interface_spec.rb
serverspec-2.19.0 spec/type/linux/interface_spec.rb
serverspec-2.18.0 spec/type/linux/interface_spec.rb
serverspec-2.17.1 spec/type/linux/interface_spec.rb
serverspec-2.17.0 spec/type/linux/interface_spec.rb
serverspec-2.16.0 spec/type/linux/interface_spec.rb