Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcfbd699

Browse files
committed
fix chmod on macos
1 parent4f788d9 commitcfbd699

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

‎agent/agentcontainers/watcher/watcher_test.go

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,20 @@ func TestFSNotifyWatcher(t *testing.T) {
3939
require.NoError(t,err,"modify test file failed")
4040

4141
// Verify that we receive the event we want.
42-
event,err:=wut.Next(ctx)
43-
require.NoError(t,err,"next event failed")
44-
45-
require.NotNil(t,event,"want non-nil event")
46-
require.True(t,event.Has(fsnotify.Write),"want write event",event.String())
47-
require.Equal(t,event.Name,testFile,"want event for test file")
42+
for {
43+
event,err:=wut.Next(ctx)
44+
require.NoError(t,err,"next event failed")
45+
46+
require.NotNil(t,event,"want non-nil event")
47+
48+
ifevent.Has(fsnotify.Chmod) {
49+
// Ignore chmod events.
50+
continue
51+
}
52+
require.Truef(t,event.Has(fsnotify.Write),"want write event: %s",event.String())
53+
require.Equal(t,event.Name,testFile,"want event for test file")
54+
break
55+
}
4856

4957
// Test removing the file from the watcher.
5058
err=wut.Remove(testFile)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp