From 466eb87184837db424e636ab6a384a5e3287da0d Mon Sep 17 00:00:00 2001 From: Matthew Rich Date: Mon, 6 May 2024 14:11:41 -0700 Subject: [PATCH] fix lint errors --- internal/resource/file_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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"