disk: CreatePartitionTable can return errors now
Modify the signature of `CreatePartitionTable` so that it is possible to return errors from the function. This is not yet used, but will be in the near future. Change all call sites accordingly: in most cases we can just bubble up the error.
This commit is contained in:
parent
4086bf8dbc
commit
199463547e
6 changed files with 8 additions and 7 deletions
|
|
@ -44,7 +44,8 @@ func TestDisk_DynamicallyResizePartitionTable(t *testing.T) {
|
|||
// math/rand is good enough in this case
|
||||
/* #nosec G404 */
|
||||
rng := rand.New(rand.NewSource(0))
|
||||
pt = disk.CreatePartitionTable(mountpoints, 1024, &pt, rng)
|
||||
pt, err := disk.CreatePartitionTable(mountpoints, 1024, &pt, rng)
|
||||
assert.NoError(t, err)
|
||||
assert.GreaterOrEqual(t, expectedSize, pt.Size)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue