Fixed unit test SELinux support

Previously, an error from GetSELinuxSupport was treated as a filesystem did
not support SELinux. Now the error is treated separately.
This commit is contained in:
Jan Safranek 2021-11-01 15:11:38 +01:00
parent 7b07b1ef0e
commit bc0c1bf1c5

View File

@ -108,7 +108,7 @@ func (hu *FakeHostUtil) GetOwner(pathname string) (int64, int64, error) {
// GetSELinuxSupport tests if pathname is on a mount that supports SELinux. // GetSELinuxSupport tests if pathname is on a mount that supports SELinux.
// Not implemented for testing // Not implemented for testing
func (hu *FakeHostUtil) GetSELinuxSupport(pathname string) (bool, error) { func (hu *FakeHostUtil) GetSELinuxSupport(pathname string) (bool, error) {
return false, errors.New("GetSELinuxSupport not implemented") return false, nil
} }
// GetMode returns permissions of pathname. // GetMode returns permissions of pathname.