aboutsummaryrefslogtreecommitdiff
path: root/setup/mscs
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-08-05 10:26:59 +0100
committerGitHub <noreply@github.com>2022-08-05 10:26:59 +0100
commitc8935fb53f122b367eda61ec7811c406193d29ba (patch)
tree928c78461943f180dde6b2b4e4cd1d26792248f1 /setup/mscs
parent1b7f84250a46b401eccb89acafdef1b379f2dbc0 (diff)
Do not use `ioutil` as it is deprecated (#2625)
Diffstat (limited to 'setup/mscs')
-rw-r--r--setup/mscs/msc2836/msc2836_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/setup/mscs/msc2836/msc2836_test.go b/setup/mscs/msc2836/msc2836_test.go
index edb1e77d..eeded427 100644
--- a/setup/mscs/msc2836/msc2836_test.go
+++ b/setup/mscs/msc2836/msc2836_test.go
@@ -7,7 +7,7 @@ import (
"crypto/sha256"
"encoding/base64"
"encoding/json"
- "io/ioutil"
+ "io"
"net/http"
"sort"
"strings"
@@ -428,12 +428,12 @@ func postRelationships(t *testing.T, expectCode int, accessToken string, req *ms
t.Fatalf("failed to do request: %s", err)
}
if res.StatusCode != expectCode {
- body, _ := ioutil.ReadAll(res.Body)
+ body, _ := io.ReadAll(res.Body)
t.Fatalf("wrong response code, got %d want %d - body: %s", res.StatusCode, expectCode, string(body))
}
if res.StatusCode == 200 {
var result msc2836.EventRelationshipResponse
- body, err := ioutil.ReadAll(res.Body)
+ body, err := io.ReadAll(res.Body)
if err != nil {
t.Fatalf("response 200 OK but failed to read response body: %s", err)
}