Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ancorgs committed Oct 18, 2023
1 parent 5ba6fc2 commit 2a4e4fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/spec_helper.rb
Expand Up @@ -136,6 +136,9 @@ def run; end
end
end

allow(Y2Storage::HWInfoReader.instance).to receive(:for_device)
.and_return Y2Storage::HWInfoDisk.new

# Bcache is only supported for x86_64 architecture. Probing the devicegraph complains if Bcache is
# used with another architecture. Bcache error is avoided here. Otherwise, x86_84 architecture must
# to be set for every test using Bcache (which has demonstrated to be quite error prone).
Expand Down
3 changes: 3 additions & 0 deletions test/y2storage/hwinfo_reader_test.rb
Expand Up @@ -29,6 +29,9 @@
let(:hwinfo_file) { "hwinfo.txt" }

before do
# Disable the global mock that normally prevents calls to hwinfo
allow(reader).to receive(:for_device).and_call_original

allow(Yast::Execute).to receive(:on_target!)
.with(/hwinfo/, anything, anything, anything).and_return(hwinfo_output)
reader.reset
Expand Down

0 comments on commit 2a4e4fd

Please sign in to comment.