Add a test target to Makefile (#1057665)

Resolves: rhbz#1057665

This target existed already in master but was unavailable in RHEL7 branch.

Submitted by: Alexander Todorov <atodorov@redhat.com>

Signed-off-by: mulhern <amulhern@redhat.com>
Remove unused exception class (#1060255)

Related: rhbz#1060255

It is not raised anywhere and seems not to really belong.

Signed-off-by: mulhern <amulhern@redhat.com>
Make a small SanityException hierarchy (#1060255)

Related: rhbz#1060255

Class hierarchy looks like this:

StorageError
   SanityException
      SanityError
         LUKSDeviceWithoutKeyError
         ... more stuff here, as needed ...
      SanityWarning
         ... more stuff here, as needed ...

SanityException should be something generated by blivet.sanityCheck.
LUKSDeviceWithoutKeyError is currently the only distinguished subclass of
SanityError. It's special,
because in some situations where sanityCheck is called, a missing key
should not be considered fatal, but it's the caller's job to figure out if
that is the situation.

Signed-off-by: mulhern <amulhern@redhat.com>
Change messages to SanityExceptions objects (#1060255)

Related: rhbz#1060255

Change string messages returned in sanityCheck tuple and in
_verifyLUKSDevicesHaveKey to Error objects.
The major purpose of this is to be able to distinguish and filter them.

Use object type to distinguish warning (SanityWarning) from errors
(SanityError) instead of passing back a pair of lists.

Also, got rid of that large chunk of commented out code, if we want it, we
know where to find it.

Signed-off-by: mulhern <amulhern@redhat.com>
Separate sanityCheck-ing from doAutoPartition (#1060255)

Related: rhbz#1060255

Moves the sanityCheck call into a separate method. The separate method
doesn't do much but allows to throw a PartitioningError in some cases where
that is expected.

Signed-off-by: mulhern <amulhern@redhat.com>