Skip to content

Commit 1f75264

Browse files
committed
Fix tests
1 parent e9a5780 commit 1f75264

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fanotify_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package fanotify
22

33
import (
4+
"errors"
45
"testing"
56

67
"github.com/stretchr/testify/assert"
@@ -13,7 +14,7 @@ func TestNewListenerInvalidFlagClassContent(t *testing.T) {
1314

1415
invalidFlag = unix.FAN_CLASS_CONTENT | unix.FAN_REPORT_FID
1516
l, err := newListener("/", invalidFlag, eventFlags, 4096)
16-
assert.Equal(t, err, ErrInvalidFlagCombination)
17+
assert.True(t, errors.Is(err, ErrInvalidFlagCombination))
1718
assert.Nil(t, l)
1819
}
1920

@@ -23,7 +24,7 @@ func TestNewListenerInvalidFlagPreClassContent(t *testing.T) {
2324

2425
invalidFlag = unix.FAN_CLASS_PRE_CONTENT | unix.FAN_REPORT_FID
2526
l, err := newListener("/", invalidFlag, eventFlags, 4096)
26-
assert.Equal(t, err, ErrInvalidFlagCombination)
27+
assert.True(t, errors.Is(err, ErrInvalidFlagCombination))
2728
assert.Nil(t, l)
2829
}
2930

0 commit comments

Comments
 (0)