Skip to content

Commit

Permalink
Fixing reads for config Mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Nov 24, 2021
1 parent 0c8241e commit c9c9de1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib/y2s390/dasds_reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def list(offline: true, force_probing: false)
attrs = Yast::Mode.config ? {} : { status: status, device_name: name, type: type }
dasd = Y2S390::Dasd.new(id, **attrs).tap do |d|
if Yast::Mode.config
d.diag = d.use_diag = use_diag?(d)
d.format = false
d.diag_wanted = d.use_diag = use_diag?(d)
d.format_wanted = false
else
update_additional_info(d)
end
Expand Down
3 changes: 2 additions & 1 deletion test/y2s390/dasds_reader_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@
expect(reader).to_not receive(:update_additional_info)
devices = reader.list
dasd = devices.by_id("0.0.0150")
expect(dasd.format).to eq(false)
expect(dasd.format_wanted).to eq(false)
expect(dasd.use_diag).to eq(false)
expect(dasd.diag_wanted).to eq(false)
expect(dasd.type).to be_nil
expect(dasd.device_name).to be_nil
end
Expand Down

0 comments on commit c9c9de1

Please sign in to comment.