switch os.ReadFile to ioutil.ReadFile due to Ubuntu 15 test failing

pull/155/head
Darren O'Connor 2022-11-15 03:00:46 +00:00 committed by mattn
parent e5c082de35
commit f76d33a68c
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package mastodon
import ( import (
"context" "context"
"fmt" "fmt"
"io/ioutil"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"os" "os"
@ -708,7 +709,7 @@ func TestUploadMedia(t *testing.T) {
if writerAttachment.ID != "123" { if writerAttachment.ID != "123" {
t.Fatalf("want %q but %q", "123", attachment.ID) t.Fatalf("want %q but %q", "123", attachment.ID)
} }
bytes, err := os.ReadFile("testdata/logo.png") bytes, err := ioutil.ReadFile("testdata/logo.png")
if err != nil { if err != nil {
t.Fatalf("could not open file: %v", err) t.Fatalf("could not open file: %v", err)
} }