diff --git a/internal/resource/file_test.go b/internal/resource/file_test.go index 2315cad..89ae1c6 100644 --- a/internal/resource/file_test.go +++ b/internal/resource/file_test.go @@ -324,7 +324,8 @@ func TestFileClone(t *testing.T) { _,updateReadErr := f.Read(ctx) assert.Nil(t, updateReadErr) - clone.Read(ctx) + _, cloneReadErr := clone.Read(ctx) + assert.Nil(t, cloneReadErr) fmt.Printf("file %#v\nclone %#v\n", f, clone) assert.NotEqual(t, f.Mtime, clone.Mtime) @@ -344,13 +345,15 @@ func TestFileErrors(t *testing.T) { read := NewFile() read.Path = testFile - read.Read(ctx) + _, readErr := read.Read(ctx) + assert.Nil(t, readErr) assert.Equal(t, "0631", read.Mode) f.Mode = "900" assert.ErrorAs(t, f.Apply(), &ErrInvalidFileMode, "Apply should fail with NumError when converting invalid octal") - read.Read(ctx) + _, updateReadErr := read.Read(ctx) + assert.Nil(t, updateReadErr) assert.Equal(t, "0631", read.Mode) f.Mode = "0631"