diff --git a/package/yast2-installation.changes b/package/yast2-installation.changes index 8f97739bc..e079e7b6e 100644 --- a/package/yast2-installation.changes +++ b/package/yast2-installation.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 8 11:57:14 UTC 2017 - lslezak@suse.cz + +- CaaSP: Display the Beta product warning at start when it is + present (bsc#1016887) +- 3.1.217.19 + ------------------------------------------------------------------- Wed Feb 1 14:20:43 UTC 2017 - jreidinger@suse.com diff --git a/package/yast2-installation.spec b/package/yast2-installation.spec index 2cd19d4aa..aeef8c56c 100644 --- a/package/yast2-installation.spec +++ b/package/yast2-installation.spec @@ -17,7 +17,7 @@ Name: yast2-installation -Version: 3.1.217.18 +Version: 3.1.217.19 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff --git a/src/lib/installation/clients/inst_casp_overview.rb b/src/lib/installation/clients/inst_casp_overview.rb index bb468de88..caf441737 100644 --- a/src/lib/installation/clients/inst_casp_overview.rb +++ b/src/lib/installation/clients/inst_casp_overview.rb @@ -48,6 +48,7 @@ def run Yast.import "CWM" Yast.import "Popup" Yast.import "Pkg" + Yast.import "InstShowInfo" textdomain "installation" @@ -59,6 +60,9 @@ def run # helpful when testing all manually on a running system Yast::Wizard.CreateDialog if separate_wizard_needed? + # show the Beta warning if it exists + Yast::InstShowInfo.show_info_txt(INFO_FILE) if File.exist?(INFO_FILE) + ret = nil loop do ret = Yast::CWM.show( @@ -102,6 +106,9 @@ def run private + # location of the info.txt file (containing the Beta warning) + INFO_FILE = "/info.txt".freeze + # Specific services that needs to be enabled on CAaSP see (FATE#321738) # It is additional services to the ones defined for role. # It is caasp only services and for generic approach systemd-presets should be used. diff --git a/test/inst_casp_overview_test.rb b/test/inst_casp_overview_test.rb index 57351e678..5eca2039a 100755 --- a/test/inst_casp_overview_test.rb +++ b/test/inst_casp_overview_test.rb @@ -69,6 +69,8 @@ def label allow(Yast::WFM).to receive(:CallFunction).and_return({}) allow(Yast::WFM).to receive(:CallFunction) .with("inst_doit", []).and_return(:next) + allow(File).to receive(:exist?).and_call_original + allow(File).to receive(:exist?).with("/info.txt").and_return(false) end it "sets package locale same as Language" do @@ -114,5 +116,21 @@ def label expect(::Installation::Services.enabled).to include("cloud-init") end + + it "displays the /info.txt file if it exists" do + expect(File).to receive(:exist?).with("/info.txt").and_return(true) + expect(Yast::InstShowInfo).to receive(:show_info_txt).with("/info.txt").and_return(true) + expect(Yast::CWM).to receive(:show).and_return(:next) + + subject.run + end + + it "does not try displaying the /info.txt file if it does not exist" do + expect(File).to receive(:exist?).with("/info.txt").and_return(false) + expect(Yast::InstShowInfo).to_not receive(:show_info_txt) + expect(Yast::CWM).to receive(:show).and_return(:next) + + subject.run + end end end