fix lint errors
Some checks failed
Lint / golangci-lint (push) Successful in 9m50s
Declarative Tests / test (push) Successful in 1m16s
Releases / build (push) Failing after 3s

This commit is contained in:
Matthew Rich 2024-05-06 14:11:41 -07:00
parent f6b8891508
commit 466eb87184

View File

@ -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"