cephfs: add test coverage for invalid file state in Fchmod

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-05-13 14:32:59 -04:00 committed by John Mulligan
parent 9a621942f3
commit 92a85b4385

View File

@ -368,6 +368,11 @@ func TestFchmod(t *testing.T) {
stats, err = os.Stat(path.Join(CephMountDir, fname))
assert.Equal(t, uint32(stats.Mode().Perm()), statsAfter)
// TODO use t.Run sub-tests where appropriate
f2 := &File{}
err = f2.Fchmod(statsAfter)
assert.Error(t, err)
}
func TestFchown(t *testing.T) {