Closed paul-rodriguez closed 1 month ago
This looks pretty good. We don't have to adjust any more generic interfaces, since expanding a partition is uniquely a gpt thing.
The assumption is that one would expand the partition, and then call table.Write()
to write it to disk?
Can we add some tests? Look at how table_test.go
does it, which probably is the right place for it. I wouldn't want to affect the original testdata/gpt.img
, but maybe it can be copied to a tmpdir, then modified, and read using the library to see that the changes took? Since we already test the reading of partition tables independently, we can rely on those to validate the changes.
The assumption is that one would expand the partition, and then call
table.Write()
to write it to disk?
Yes indeed.
Can we add some tests? Look at how
table_test.go
does it, which probably is the right place for it. I wouldn't want to affect the originaltestdata/gpt.img
, but maybe it can be copied to a tmpdir, then modified, and read using the library to see that the changes took? Since we already test the reading of partition tables independently, we can rely on those to validate the changes.
Sure thing, thanks for the pointers.
@deitch I have pushed some unit tests for the Resize and Expand functions. My apologies if this mention is not good etiquette!
Not a problem at all. Thank you for this. Let's let CI run.
Some linting issues.
It should be ok now
Looks good. Are you ready to go with this?
Yes, it works fine for my purposes. Thank you!
Thanks @paul-rodriguez
These changes allow: