Skip to content

Commit

Permalink
do not export subvolumes_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Nov 30, 2017
1 parent 19b0f7e commit 9c60bc0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/modules/AutoinstPartPlan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,14 @@ def Export
drives << skip_device
end

# Remove all subvolumes_prefix entries because they are defined
# in the product description files.
drives.each do |drive|
drive["partitions"].each do |partition|
partition.delete("subvolumes_prefix") if partition.has_key?("subvolumes_prefix")
end
end

drives
end

Expand Down
10 changes: 10 additions & 0 deletions test/AutoinstPartPlan_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,15 @@ def devicegraph_from(file_name)
snapshots = subvolumes.select { |s| s.include?("snapshot") }
expect(snapshots).to be_empty
end

it "does not include subvolumes_prefix tag" do
subvolumes_prefix = exported.select do |drive|
partitions = drive["partitions"].select do |partition|
partition.has_key?("subvolumes_prefix")
end
!partitions.empty?
end
expect(subvolumes_prefix).to be_empty
end
end
end

0 comments on commit 9c60bc0

Please sign in to comment.