File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -104,17 +104,17 @@ func TestWithCapSysAdmFanotifyFileModified(t *testing.T) {
104104 assert .Nil (t , err )
105105 assert .NotNil (t , l )
106106 watchDir := t .TempDir ()
107+
107108 t .Logf ("Watch Directory: %s" , watchDir )
108- action := FileModified
109- l .AddWatch (watchDir , action )
110- go l .Start ()
111- defer l .Stop ()
112- // generate event
113109 data := []byte ("test data..." )
114110 testFile := fmt .Sprintf ("%s/test.dat" , watchDir )
115111 err = os .WriteFile (testFile , data , 0666 )
116112 assert .Nil (t , err )
117113 t .Logf ("Test file created %s" , testFile )
114+ action := FileModified
115+ l .AddWatch (watchDir , action )
116+ go l .Start ()
117+ defer l .Stop ()
118118 pid , err := modifyFile (testFile )
119119 assert .Nil (t , err )
120120 select {
You can’t perform that action at this time.
0 commit comments