cephfs: add test coverage for invalid file state in Fchown

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-05-13 14:33:43 -04:00 committed by John Mulligan
parent 92a85b4385
commit ce8e45541b
1 changed files with 5 additions and 0 deletions

View File

@ -409,4 +409,9 @@ func TestFchown(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, uint32(stats.Sys().(*syscall.Stat_t).Uid), bob)
assert.Equal(t, uint32(stats.Sys().(*syscall.Stat_t).Gid), bob)
// TODO use t.Run sub-tests where appropriate
f2 := &File{}
err = f2.Fchown(bob, bob)
assert.Error(t, err)
}