|
@@ -5,7 +5,6 @@ import (
|
|
|
"context"
|
|
|
"crypto/rand"
|
|
|
"io"
|
|
|
- "io/ioutil"
|
|
|
"net/http"
|
|
|
"net/url"
|
|
|
"testing"
|
|
@@ -74,7 +73,7 @@ func TestHttpConformance(t *testing.T) {
|
|
|
t.Fatal("status: ", resp.StatusCode)
|
|
|
}
|
|
|
|
|
|
- content, err := ioutil.ReadAll(resp.Body)
|
|
|
+ content, err := io.ReadAll(resp.Body)
|
|
|
common.Must(err)
|
|
|
if string(content) != "Home" {
|
|
|
t.Fatal("body: ", string(content))
|
|
@@ -267,7 +266,7 @@ func TestHttpPost(t *testing.T) {
|
|
|
t.Fatal("status: ", resp.StatusCode)
|
|
|
}
|
|
|
|
|
|
- content, err := ioutil.ReadAll(resp.Body)
|
|
|
+ content, err := io.ReadAll(resp.Body)
|
|
|
common.Must(err)
|
|
|
if r := cmp.Diff(content, xor(payload)); r != "" {
|
|
|
t.Fatal(r)
|
|
@@ -361,7 +360,7 @@ func TestHttpBasicAuth(t *testing.T) {
|
|
|
t.Fatal("status: ", resp.StatusCode)
|
|
|
}
|
|
|
|
|
|
- content, err := ioutil.ReadAll(resp.Body)
|
|
|
+ content, err := io.ReadAll(resp.Body)
|
|
|
common.Must(err)
|
|
|
if string(content) != "Home" {
|
|
|
t.Fatal("body: ", string(content))
|