Skip to content

Commit

Permalink
Updated the testsuite to cover requested_lvm_reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Feb 14, 2024
1 parent 366e6f3 commit 1f4516e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/y2storage/storage_env_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,26 @@
end
end
end

describe "#requested_lvm_reuse" do
context "YAST_REUSE_LVM is set to '1'" do
let(:env_vars) do
{ "YAST_REUSE_LVM" => "1" }
end

it "returns true" do
expect(Y2Storage::StorageEnv.instance.requested_lvm_reuse).to be true
end
end

context "YAST_REUSE_LVM not set" do
let(:env_vars) do
{}
end

it "returns nil" do
expect(Y2Storage::StorageEnv.instance.requested_lvm_reuse).to be nil
end
end
end
end

0 comments on commit 1f4516e

Please sign in to comment.