disk: implement VolumeContainer interface for PartitionTable

Co-Authored-By: Christian Kellner <christian@kellner.me>
This commit is contained in:
Achilleas Koutsou 2022-02-10 20:22:51 +01:00 committed by Tom Gundersen
parent 2b957a7de6
commit 3312323db1
2 changed files with 35 additions and 2 deletions

View file

@ -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