cephfs: add test coverage for invalid file state in Fchmod
@@ -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) {
