Sha256: 499b6afda1a6cc0f650075403bdf9573fee88f2e42ae0539825f750e76e36af7

Contents?: true

Size: 825 Bytes

Versions: 6

Compression:

Stored size: 825 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
  let(:stdout) { '1500' }
  its(:mtu) { should eq 1500 }
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

describe interface('invalid-interface') do
  let(:stdout) { '9001' }
  its(:mtu) { should_not eq 1500 }
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
serverspec-2.30.1 spec/type/linux/interface_spec.rb
serverspec-2.30.0 spec/type/linux/interface_spec.rb
serverspec-2.29.2 spec/type/linux/interface_spec.rb
serverspec-2.29.1 spec/type/linux/interface_spec.rb
serverspec-2.29.0 spec/type/linux/interface_spec.rb
serverspec-2.28.0 spec/type/linux/interface_spec.rb