Skip to content

Commit

Permalink
fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Aug 20, 2021
1 parent c4f9135 commit b540f12
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions spec/unit/provider/network_config/redhat_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def fixture_data(file)
describe 'the onboot property' do
let(:data) { described_class.parse_file('eth0', fixture_data('eth0-dhcp'))[0] }

it { expect(data[:onboot]).to be true }
it { expect(data[:onboot]).to eq('yes') }
end

describe 'the method property' do
Expand All @@ -76,13 +76,13 @@ def fixture_data(file)
describe 'when true' do
let(:data) { described_class.parse_file('eth0', fixture_data('eth0-hotplug'))[0] }

it { expect(data[:hotplug]).to be true }
it { expect(data[:hotplug]).to eq('yes') }
end

describe 'when false' do
let(:data) { described_class.parse_file('eth0', fixture_data('eth0-nohotplug'))[0] }

it { expect(data[:hotplug]).to be false }
it { expect(data[:hotplug]).to eq('no') }
end
end

Expand Down Expand Up @@ -116,7 +116,7 @@ def fixture_data(file)
describe 'bond0' do
subject { described_class.instances.find { |i| i.name == 'bond0' } }

its(:onboot) { is_expected.to be true }
its(:onboot) { is_expected.to eq('yes') }
its(:mtu) { is_expected.to eq('1500') }
its(:options) do
is_expected.to eq(
Expand All @@ -128,7 +128,7 @@ def fixture_data(file)
describe 'bond1' do
subject { described_class.instances.find { |i| i.name == 'bond1' } }

its(:onboot) { is_expected.to be true }
its(:onboot) { is_expected.to eq('yes') }
its(:ipaddress) { is_expected.to eq('172.20.1.9') }
its(:netmask) { is_expected.to eq('255.255.255.0') }
its(:mtu) { is_expected.to eq('1500') }
Expand All @@ -142,7 +142,7 @@ def fixture_data(file)
describe 'eth0' do
subject { described_class.instances.find { |i| i.name == 'eth0' } }

its(:onboot) { is_expected.to be true }
its(:onboot) { is_expected.to eq('yes') }
its(:mtu) { is_expected.to eq('1500') }
its(:mode) { is_expected.to eq(:raw) }
its(:options) do
Expand All @@ -157,7 +157,7 @@ def fixture_data(file)
describe 'eth1' do
subject { described_class.instances.find { |i| i.name == 'eth1' } }

its(:onboot) { is_expected.to be true }
its(:onboot) { is_expected.to eq('yes') }
its(:mtu) { is_expected.to eq('1500') }
its(:mode) { is_expected.to eq(:raw) }
its(:options) do
Expand All @@ -172,7 +172,7 @@ def fixture_data(file)
describe 'eth2' do
subject { described_class.instances.find { |i| i.name == 'eth2' } }

its(:onboot) { is_expected.to be true }
its(:onboot) { is_expected.to eq('yes') }
its(:mtu) { is_expected.to eq('1500') }
its(:mode) { is_expected.to eq(:raw) }
its(:options) do
Expand All @@ -187,7 +187,7 @@ def fixture_data(file)
describe 'eth3' do
subject { described_class.instances.find { |i| i.name == 'eth3' } }

its(:onboot) { is_expected.to be true }
its(:onboot) { is_expected.to eq('yes') }
its(:mtu) { is_expected.to eq('1500') }
its(:mode) { is_expected.to eq(:raw) }
its(:options) do
Expand Down Expand Up @@ -301,7 +301,7 @@ def fixture_data(file)
describe 'eth0.0' do
subject { described_class.instances.find { |i| i.name == 'eth0.0' } }

its(:onboot) { is_expected.to be true }
its(:onboot) { is_expected.to eq('yes') }
its(:method) { is_expected.to eq('static') }
its(:mtu) { is_expected.to eq('9000') }
its(:mode) { is_expected.to eq(:vlan) }
Expand All @@ -318,7 +318,7 @@ def fixture_data(file)
describe 'eth0.1' do
subject { described_class.instances.find { |i| i.name == 'eth0.1' } }

its(:onboot) { is_expected.to be true }
its(:onboot) { is_expected.to eq('yes') }
its(:method) { is_expected.to eq('static') }
its(:mtu) { is_expected.to eq('9000') }
its(:mode) { is_expected.to eq(:vlan) }
Expand All @@ -335,7 +335,7 @@ def fixture_data(file)
describe 'eth0.4095' do
subject { described_class.instances.find { |i| i.name == 'eth0.4095' } }

its(:onboot) { is_expected.to be true }
its(:onboot) { is_expected.to eq('yes') }
its(:method) { is_expected.to eq('static') }
its(:mtu) { is_expected.to eq('9000') }
its(:mode) { is_expected.to eq(:vlan) }
Expand Down Expand Up @@ -368,7 +368,7 @@ def fixture_data(file)
instance_double('eth0_provider',
name: 'eth0',
ensure: :present,
onboot: true,
onboot: 'yes',
hotplug: true,
family: 'inet',
method: 'none',
Expand All @@ -383,7 +383,7 @@ def fixture_data(file)
instance_double('eth0_1_provider',
name: 'eth0.1',
ensure: :present,
onboot: true,
onboot: 'yes',
hotplug: true,
family: 'inet',
method: 'none',
Expand Down Expand Up @@ -412,7 +412,7 @@ def fixture_data(file)
let(:lo_provider) do
instance_double('lo_provider',
name: 'lo',
onboot: true,
onboot: 'yes',
hotplug: true,
family: 'inet',
method: 'loopback',
Expand Down

0 comments on commit b540f12

Please sign in to comment.