These are just a bunch of preparatory patches. Most of them aren't too risky.
Remove... is semantics preserving and very low risk.
Factor... is just setting up to reuse some previous simple testing
infrastructure. Very low risk.
Add tests...just checking a few more properties that I missed last time. Very
low risk.
StorageDevice.minSize... changes a behavior.
Raise ValueError...just swapping on exception for another that looks better.
BTRFSSubVolume.volume...small behavior change.
Check that a BTRFS...I think no subvolume should ever have more than one
parent. If I'm wrong then this is a bug.
Robustify...minor change, seems consistent.
Add some baseline unit...these test what I see happening. If any of the tests
seem to expect the wrong thing, this is significant, because they do all pass.
Add a test that probably should fail...I think I've spotted a bug here, but
I'm not sure.
Remove redundant checks...if I'm wrong about how resize is called then this
patch is a bug, but also the current code is buggy.
Put additonal constraints on the ActionDevice initializer...if these constraints
are not valid then this is a bug.
Adjust currentSize methods...the actual changes are minor.
mulhern (13):
Remove redundant condition in if statement.
Factor state testing behavior into a separate class.
Add tests for a couple of additional properties for MDRaidArrayDevice.
StorageDevice.minSize returns 0 if format's minSize is 0.
Raise ValueError in BTRFS constructor if no parents specified.
BTRFSSubVolume.volume checks the class of its return value.
Check that a BTRFS subvolume has exactly one parent in constructor.
Robustify use of defaultSubVolumeID field.
Add some baseline unit tests for BTRFS devices.
Add a test that probably should fail.
Remove redundant checks in existing resize() methods.
Put additional constraints on the ActionResizeDevice initializer.
Adjust currentSize methods slightly.
blivet/deviceaction.py | 6 ++
blivet/devices.py | 98 ++++++++++++++++++-----------
tests/devices_test.py | 163 ++++++++++++++++++++++++++++++++++++++++++-------
3 files changed, 211 insertions(+), 56 deletions(-)
--
1.8.3.1