mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Misc ioutil deprecation adjustments
To make the tests pass. * Replace io => os.ReadFile in magefile.go * Adjust failing image test vs fs.DirEntry * Adjust poller test See #10732
This commit is contained in:
@@ -34,10 +34,14 @@ func TestPollerAddRemove(t *testing.T) {
|
||||
c.Assert(w.Add("foo"), qt.Not(qt.IsNil))
|
||||
c.Assert(w.Remove("foo"), qt.Not(qt.IsNil))
|
||||
|
||||
f, err := os.CreateTemp(t.TempDir(), "asdf")
|
||||
f, err := os.CreateTemp("", "asdf")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
c.Cleanup(func() {
|
||||
c.Assert(w.Close(), qt.IsNil)
|
||||
os.Remove(f.Name())
|
||||
})
|
||||
c.Assert(w.Add(f.Name()), qt.IsNil)
|
||||
c.Assert(w.Remove(f.Name()), qt.IsNil)
|
||||
|
||||
|
Reference in New Issue
Block a user