Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AY: write linuxrc proxy and hostname to inst-sys #893

Merged
merged 1 commit into from Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions package/yast2-installation.changes
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Oct 27 22:30:43 UTC 2020 - Knut Anderssen <kanderssen@suse.com>

- Write hostname and proxy configuration to the inst-sys when
configured through linuxrc not only during an installation but
also when running an autoinstallation (bsc#1177768)
- 4.2.47

-------------------------------------------------------------------
Fri Oct 9 15:04:33 UTC 2020 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-installation.spec
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2-installation
Version: 4.2.46
Version: 4.2.47
Release: 0
Group: System/YaST
License: GPL-2.0-only
Expand Down
4 changes: 3 additions & 1 deletion src/lib/installation/clients/inst_install_inf.rb
Expand Up @@ -16,7 +16,9 @@ class InstInstallInfClient < Client
def main
textdomain "installation"

InstallInfConvertor.instance.write_netconfig unless Mode.auto
InstallInfConvertor.instance.write_netconfig

return :next if Mode.auto

Yast::Wizard.CreateDialog if separate_wizard_needed?

Expand Down
23 changes: 13 additions & 10 deletions test/inst_install_inf_test.rb
Expand Up @@ -4,13 +4,14 @@
require "installation/clients/inst_install_inf"

describe Yast::InstInstallInfClient do
let(:auto) { false }

before do
allow(Yast::InstallInfConvertor.instance).to receive(:write_netconfig)
allow(Yast::SCR).to receive(:Read)
allow(Yast::SCR).to receive(:Write)
allow(Yast::Linuxrc).to receive(:InstallInf)
allow(Yast::Mode).to receive(:auto)
allow(Yast::Mode).to receive(:auto).and_return(auto)
end

describe "#main" do
Expand All @@ -24,18 +25,20 @@
let(:invalid_url) { "http://wrong_url{}.com" }
let(:valid_url) { "https://scc.custom.com" }

it "allows the user to fix it it's invalid" do
expect(Yast::Linuxrc).to receive(:InstallInf).with("regurl").and_return(invalid_url)
expect(subject).to receive(:fix_regurl!).with(invalid_url)
context "and not running an autoinstallation" do
it "allows the user to fix it it's invalid" do
expect(Yast::Linuxrc).to receive(:InstallInf).with("regurl").and_return(invalid_url)
expect(subject).to receive(:fix_regurl!).with(invalid_url)

subject.main
end
subject.main
end

it "does nothing with the URL in case of valid" do
expect(Yast::Linuxrc).to receive(:InstallInf).with("regurl").and_return(valid_url)
expect(subject).to_not receive(:fix_regurl!)
it "does nothing with the URL in case of valid" do
expect(Yast::Linuxrc).to receive(:InstallInf).with("regurl").and_return(valid_url)
expect(subject).to_not receive(:fix_regurl!)

subject.main
subject.main
end
end
end

Expand Down