TUN-7590: Remove usages of ioutil

This commit is contained in:
Devin Carr
2023-07-14 18:42:48 -07:00
parent 1b0b6bf7a8
commit b500e556bf
23 changed files with 49 additions and 62 deletions

View File

@@ -7,7 +7,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"net/url"
@@ -64,7 +63,7 @@ func TestCertGenSuccess(t *testing.T) {
mockRequest = func(url, contentType string, body io.Reader) (*http.Response, error) {
assert.Contains(t, "/cdn-cgi/access/cert_sign", url)
assert.Equal(t, "application/json", contentType)
buf, err := ioutil.ReadAll(body)
buf, err := io.ReadAll(body)
assert.NoError(t, err)
assert.NotEmpty(t, buf)
return w.Result(), nil