summaryrefslogtreecommitdiff
path: root/internal/gitlabnet/twofactorverify/client_test.go
diff options
context:
space:
mode:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2021-08-19 15:54:20 +0000
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-08-19 15:54:20 +0000
commit087c010c476ed6c009b6c94a76a7e9db3b9d3fdd (patch)
treec68aac4473adea2eae5ead5d49c173f80dac3e8c /internal/gitlabnet/twofactorverify/client_test.go
parenta83f8b31982222ad64b23a47ee6d092042cf9f1a (diff)
downloadgitlab-shell-087c010c476ed6c009b6c94a76a7e9db3b9d3fdd.tar.gz
refactor: move away from ioutil (deprecated)
Diffstat (limited to 'internal/gitlabnet/twofactorverify/client_test.go')
-rw-r--r--internal/gitlabnet/twofactorverify/client_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/gitlabnet/twofactorverify/client_test.go b/internal/gitlabnet/twofactorverify/client_test.go
index 9893b12..e4f837b 100644
--- a/internal/gitlabnet/twofactorverify/client_test.go
+++ b/internal/gitlabnet/twofactorverify/client_test.go
@@ -3,11 +3,12 @@ package twofactorverify
import (
"context"
"encoding/json"
- "gitlab.com/gitlab-org/gitlab-shell/internal/gitlabnet/discover"
- "io/ioutil"
+ "io"
"net/http"
"testing"
+ "gitlab.com/gitlab-org/gitlab-shell/internal/gitlabnet/discover"
+
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitlab-shell/client"
"gitlab.com/gitlab-org/gitlab-shell/client/testserver"
@@ -20,7 +21,7 @@ func initialize(t *testing.T) []testserver.TestRequestHandler {
{
Path: "/api/v4/internal/two_factor_otp_check",
Handler: func(w http.ResponseWriter, r *http.Request) {
- b, err := ioutil.ReadAll(r.Body)
+ b, err := io.ReadAll(r.Body)
defer r.Body.Close()
require.NoError(t, err)