diff --git a/src/lib/bootloader/mbr_update.rb b/src/lib/bootloader/mbr_update.rb index 3d505c1bd..ceeebe488 100644 --- a/src/lib/bootloader/mbr_update.rb +++ b/src/lib/bootloader/mbr_update.rb @@ -19,6 +19,8 @@ class MBRUpdate # Update contents of MBR (active partition and booting code) # @return [Boolean] true on success def run + return true if Yast::Arch.s390 + activate = Yast::BootCommon.globals["activate"] == "true" generic_mbr = Yast::BootCommon.globals["generic_mbr"] == "true" diff --git a/test/mbr_update_test.rb b/test/mbr_update_test.rb index b6ed75fd9..d03a3a938 100644 --- a/test/mbr_update_test.rb +++ b/test/mbr_update_test.rb @@ -20,6 +20,9 @@ dev + num.to_s end + # by default common architecture" + allow(Yast::Arch).to receive(:architecture).and_return("x86_64") + # fake query for gpt label allow(Yast::Storage).to receive(:GetTargetMap).and_return( double(:fetch => { "label" => "msdos" }, @@ -28,6 +31,16 @@ ) end + context "on s390" do + before do + allow(Yast::Arch).to receive(:architecture).and_return("s390_64") + end + + it "does nothing except returning true" do + expect(subject.run).to eq true + end + end + context "BootCommon.backup_mbr config is not set" do before do Yast::BootCommon.backup_mbr = false