mirror of
https://github.com/syncthing/notify.git
synced 2026-06-07 08:57:32 +00:00
Add go.sum to placate cmd/go. Check error from os.RemoveAll in test. Make NewNotifyTest and friends handle cleanup. This way the callers don't need to manage it. It is also more robust in the face of test failure, and thus less likely to strand testdata test files. Use t.TempDir instead of ioutil.TempDir. Use os.SameFile to test for path equality. On macOS, the temp dir is located in /var, which can also have path /private/var. Make the tests resilient to changes in the exact path name. With this fix, all tests now pass locally on macOS. Be more careful about cleaning up test trees. Fatalf calls runtime.Goexit, which doesn't run deferred funcs. Remove the defer and just call RemoveAll directly. This should help prevent stranded testdata dirs on test failure. Remove ioutil. It is deprecated.
3 lines
207 B
Plaintext
3 lines
207 B
Plaintext
golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7 h1:bit1t3mgdR35yN0cX0G8orgLtOuyL9Wqxa1mccLB0ig=
|
|
golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|