disk: add RequiredSizes to ImageOptions
These RequiredSizes are a map that is passed on to the partition table logic which had hardcoded defaults. This makes it possible to define either no RequiredSizes (`nil`) or empty RequiredSizes which means no further constraint checks or partition resizes will be done.
This commit is contained in:
parent
d7f5fac183
commit
39879a9f60
17 changed files with 188 additions and 57 deletions
|
|
@ -18,7 +18,7 @@ func TestGenDeviceCreationStages(t *testing.T) {
|
|||
|
||||
luks_lvm := testPartitionTables["luks+lvm"]
|
||||
|
||||
pt, err := disk.NewPartitionTable(&luks_lvm, []blueprint.FilesystemCustomization{}, 0, false, rng)
|
||||
pt, err := disk.NewPartitionTable(&luks_lvm, []blueprint.FilesystemCustomization{}, 0, false, make(map[string]uint64), rng)
|
||||
assert.NoError(err)
|
||||
|
||||
stages := GenDeviceCreationStages(pt, "image.raw")
|
||||
|
|
@ -81,7 +81,7 @@ func TestGenDeviceFinishStages(t *testing.T) {
|
|||
|
||||
luks_lvm := testPartitionTables["luks+lvm"]
|
||||
|
||||
pt, err := disk.NewPartitionTable(&luks_lvm, []blueprint.FilesystemCustomization{}, 0, false, rng)
|
||||
pt, err := disk.NewPartitionTable(&luks_lvm, []blueprint.FilesystemCustomization{}, 0, false, make(map[string]uint64), rng)
|
||||
assert.NoError(err)
|
||||
|
||||
stages := GenDeviceFinishStages(pt, "image.raw")
|
||||
|
|
@ -124,7 +124,7 @@ func TestGenDeviceFinishStagesOrderWithLVMClevisBind(t *testing.T) {
|
|||
|
||||
luks_lvm := testPartitionTables["luks+lvm+clevisBind"]
|
||||
|
||||
pt, err := disk.NewPartitionTable(&luks_lvm, []blueprint.FilesystemCustomization{}, 0, false, rng)
|
||||
pt, err := disk.NewPartitionTable(&luks_lvm, []blueprint.FilesystemCustomization{}, 0, false, make(map[string]uint64), rng)
|
||||
assert.NoError(err)
|
||||
|
||||
stages := GenDeviceFinishStages(pt, "image.raw")
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ func TestGenImageKernelOptions(t *testing.T) {
|
|||
|
||||
luks_lvm := testPartitionTables["luks+lvm"]
|
||||
|
||||
pt, err := disk.NewPartitionTable(&luks_lvm, []blueprint.FilesystemCustomization{}, 0, false, rng)
|
||||
pt, err := disk.NewPartitionTable(&luks_lvm, []blueprint.FilesystemCustomization{}, 0, false, make(map[string]uint64), rng)
|
||||
assert.NoError(err)
|
||||
|
||||
var uuid string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue