55 "context"
66 "encoding/json"
77 "fmt"
8- "io/ioutil "
8+ "io"
99 "net/http"
1010 "reflect"
1111 "strings"
@@ -63,7 +63,7 @@ func TestSendJoinFallback(t *testing.T) {
6363 if strings .HasPrefix (req .URL .Path , "/_matrix/federation/v2/send_join" ) {
6464 return & http.Response {
6565 StatusCode : 404 ,
66- Body : ioutil .NopCloser (strings .NewReader ("404 not found" )),
66+ Body : io .NopCloser (strings .NewReader ("404 not found" )),
6767 }, nil
6868 }
6969 if ! strings .HasPrefix (req .URL .Path , "/_matrix/federation/v1/send_join" ) {
@@ -72,7 +72,7 @@ func TestSendJoinFallback(t *testing.T) {
7272 t .Logf ("Sending response: %s" , string (v1ResBytes ))
7373 return & http.Response {
7474 StatusCode : 200 ,
75- Body : ioutil .NopCloser (bytes .NewReader (v1ResBytes )),
75+ Body : io .NopCloser (bytes .NewReader (v1ResBytes )),
7676 }, nil
7777 },
7878 },
@@ -126,12 +126,12 @@ func TestSendJoinJSON(t *testing.T) {
126126 t .Logf ("Sending response: %s" , string (respSendJoinResponseJSON ))
127127 return & http.Response {
128128 StatusCode : 200 ,
129- Body : ioutil .NopCloser (bytes .NewReader (respSendJoinResponseJSON )),
129+ Body : io .NopCloser (bytes .NewReader (respSendJoinResponseJSON )),
130130 }, nil
131131 }
132132 return & http.Response {
133133 StatusCode : 404 ,
134- Body : ioutil .NopCloser (strings .NewReader ("404 not found" )),
134+ Body : io .NopCloser (strings .NewReader ("404 not found" )),
135135 }, nil
136136 },
137137 },
@@ -185,12 +185,12 @@ func TestSendTransactionToRelay(t *testing.T) {
185185 if strings .HasPrefix (req .URL .Path , "/_matrix/federation/v1/send_relay" ) {
186186 return & http.Response {
187187 StatusCode : 200 ,
188- Body : ioutil .NopCloser (bytes .NewReader (respSendResponseJSON )),
188+ Body : io .NopCloser (bytes .NewReader (respSendResponseJSON )),
189189 }, nil
190190 }
191191 return & http.Response {
192192 StatusCode : 404 ,
193- Body : ioutil .NopCloser (strings .NewReader ("404 not found" )),
193+ Body : io .NopCloser (strings .NewReader ("404 not found" )),
194194 }, nil
195195 },
196196 },
@@ -232,12 +232,12 @@ func TestSendTransactionToRelayReportsFailure(t *testing.T) {
232232 if strings .HasPrefix (req .URL .Path , "/_matrix/federation/v1/send_relay" ) {
233233 return & http.Response {
234234 StatusCode : 400 ,
235- Body : ioutil .NopCloser (bytes .NewReader (respSendResponseJSON )),
235+ Body : io .NopCloser (bytes .NewReader (respSendResponseJSON )),
236236 }, nil
237237 }
238238 return & http.Response {
239239 StatusCode : 404 ,
240- Body : ioutil .NopCloser (strings .NewReader ("404 not found" )),
240+ Body : io .NopCloser (strings .NewReader ("404 not found" )),
241241 }, nil
242242 },
243243 },
0 commit comments