Skip to content

Commit 5bde8db

Browse files
committed
fixed testcase
1 parent e611cee commit 5bde8db

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/lib/bootloader/bls_sections.rb

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def initialize
2323

2424
# @return [String] title of default boot section.
2525
def default
26+
return unless @data
27+
2628
entry = @data.select { |d| d["id"] == @default }
2729
if entry.empty?
2830
""

test/grub2_bls_test.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
subject.read
3737

3838
expect(subject.cpu_mitigations.to_human_string).to eq "Off"
39-
expect(subject.grub_default.kernel_params.serialize).to eq cmdline_content
39+
expect(subject.grub_default.kernel_params.serialize).to include cmdline_content
4040
end
4141
end
4242

@@ -69,6 +69,7 @@
6969
end
7070

7171
it "installs the bootloader" do
72+
allow(Yast::Stage).to receive(:initial).and_return(true)
7273
allow(Bootloader::Bls).to receive(:write_default_menu)
7374
.with(subject.sections.default)
7475
allow(Bootloader::Bls).to receive(:write_menu_timeout)

0 commit comments

Comments
 (0)