mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 05:30:54 +03: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:
parent
d453c12742
commit
a669467d98
3 changed files with 15 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue