Skip to content

Commit

Permalink
Write the configuration properly during autoinstallation
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Sep 28, 2020
1 parent 3ba9583 commit a980d08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/network/network_autoconfiguration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def configure_virtuals
# wait for rebooting into just installed target
return if Lan.yast_config == Lan.system_config

Lan.yast_config.write
Lan.write_config
end

# Propose DNS and Hostname setup
Expand Down
6 changes: 3 additions & 3 deletions test/network_autoconfiguration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def probe_netcard_factory(num)
allow(Y2Network::Config).to receive(:find).with(:yast).and_return(yast_config)
allow(Y2Network::Config).to receive(:find).with(:system).and_return(system_config)
allow(instance).to receive(:virtual_proposal_required?).and_return(proposal)
allow(yast_config).to receive(:write)
allow(Yast::Lan).to receive(:write_config)
allow_any_instance_of(Y2Network::VirtualizationConfig)
.to receive(:connected_and_bridgeable?).and_return(true)
allow(Yast::PackageSystem).to receive(:Installed).and_return(true)
Expand Down Expand Up @@ -231,7 +231,7 @@ def probe_netcard_factory(num)
end

it "writes the configuration of the interfaces" do
expect(Yast::Lan.yast_config).to receive(:write)
expect(Yast::Lan).to receive(:write_config)
instance.configure_virtuals
end

Expand All @@ -241,7 +241,7 @@ def probe_netcard_factory(num)
end

it "writes the routing config" do
expect(yast_config).to receive(:write)
expect(Yast::Lan).to receive(:write_config)
instance.configure_virtuals
end
end
Expand Down

0 comments on commit a980d08

Please sign in to comment.