disk: implement VolumeContainer interface for PartitionTable
Co-Authored-By: Christian Kellner <christian@kellner.me>
This commit is contained in:
parent
2b957a7de6
commit
3312323db1
2 changed files with 35 additions and 2 deletions
|
|
@ -66,9 +66,9 @@ func TestDisk_DynamicallyResizePartitionTable(t *testing.T) {
|
|||
// math/rand is good enough in this case
|
||||
/* #nosec G404 */
|
||||
rng := rand.New(rand.NewSource(0))
|
||||
pt, err := CreatePartitionTable(mountpoints, 1024, &pt, rng)
|
||||
newpt, err := NewPartitionTable(&pt, mountpoints, 1024, rng)
|
||||
assert.NoError(t, err)
|
||||
assert.GreaterOrEqual(t, pt.SectorsToBytes(pt.Size), expectedSize)
|
||||
assert.GreaterOrEqual(t, newpt.Size, expectedSize)
|
||||
}
|
||||
|
||||
// common partition table that use used by tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue