Skip to content

Commit f853f89

Browse files
author
wafuwafu13
committed
fix ineffassign in test
1 parent 12ef13f commit f853f89

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,4 @@ issues:
1717
- path: _test\.go
1818
linters:
1919
- errcheck
20-
- gosimple
2120
- staticcheck
22-
- ineffassign
23-

check-log/lib/check-log_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func TestGetInode(t *testing.T) {
5959

6060
i, err = getInode(f)
6161
assert.Equal(t, err, nil, "err should be nil")
62-
assert.Equal(t, state.Inode, uint(150))
62+
assert.Equal(t, i, uint(150))
6363
}
6464

6565
func TestGetBytesToSkip(t *testing.T) {

check-log/lib/check-log_unix_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ func TestFindFileByInode(t *testing.T) {
2121

2222
testFileExist := func() {
2323
logfi, err := os.Stat(logf)
24+
assert.Equal(t, err, nil, "err should be nil")
2425
inode := detectInode(logfi)
2526
f, err := findFileByInode(inode, dir)
2627
assert.Equal(t, err, nil, "err should be nil")

0 commit comments

Comments
 (0)