Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Sep 5, 2024
1 parent 7019e69 commit 3083d2b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions service/test/y2storage/agama_proposal_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
require "agama/storage/config"
require "y2storage/agama_proposal"

# @param config [Agama::Storage::Configs::Drive, Agama::Storage::Configs::Partition]
# @param name [String, nil] e.g., "/dev/vda"
# @param filesystem [String, nil] e.g., "xfs"
def block_device_config(config, name: nil, filesystem: nil)
if name
config.search = Agama::Storage::Configs::Search.new.tap do |search_config|
Expand All @@ -42,11 +45,16 @@ def block_device_config(config, name: nil, filesystem: nil)
config
end

# @param name [String, nil] e.g., "/dev/vda"
# @param filesystem [String, nil] e.g., "xfs"
def drive_config(name: nil, filesystem: nil)
config = Agama::Storage::Configs::Drive.new
block_device_config(config, name: name, filesystem: filesystem)
end

# @param name [String, nil] e.g., "/dev/vda"
# @param filesystem [String, nil] e.g., "xfs"
# @param size [Y2Storage::DiskSize]
def partition_config(name: nil, filesystem: nil, size: nil)
config = Agama::Storage::Configs::Partition.new
block_device_config(config, name: name, filesystem: filesystem)
Expand Down

0 comments on commit 3083d2b

Please sign in to comment.