summaryrefslogtreecommitdiff
path: root/internal/command/shared
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/command/shared
parenta83f8b31982222ad64b23a47ee6d092042cf9f1a (diff)
downloadgitlab-shell-087c010c476ed6c009b6c94a76a7e9db3b9d3fdd.tar.gz
refactor: move away from ioutil (deprecated)
Diffstat (limited to 'internal/command/shared')
-rw-r--r--internal/command/shared/accessverifier/accessverifier_test.go4
-rw-r--r--internal/command/shared/customaction/customaction_test.go10
2 files changed, 7 insertions, 7 deletions
diff --git a/internal/command/shared/accessverifier/accessverifier_test.go b/internal/command/shared/accessverifier/accessverifier_test.go
index 8e0b5f9..54904e0 100644
--- a/internal/command/shared/accessverifier/accessverifier_test.go
+++ b/internal/command/shared/accessverifier/accessverifier_test.go
@@ -4,7 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
- "io/ioutil"
+ "io"
"net/http"
"testing"
@@ -27,7 +27,7 @@ func setup(t *testing.T) (*Command, *bytes.Buffer, *bytes.Buffer) {
{
Path: "/api/v4/internal/allowed",
Handler: func(w http.ResponseWriter, r *http.Request) {
- b, err := ioutil.ReadAll(r.Body)
+ b, err := io.ReadAll(r.Body)
require.NoError(t, err)
var requestBody *accessverifier.Request
diff --git a/internal/command/shared/customaction/customaction_test.go b/internal/command/shared/customaction/customaction_test.go
index d3e794c..b26ce81 100644
--- a/internal/command/shared/customaction/customaction_test.go
+++ b/internal/command/shared/customaction/customaction_test.go
@@ -4,7 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
- "io/ioutil"
+ "io"
"net/http"
"testing"
@@ -23,7 +23,7 @@ func TestExecuteEOFSent(t *testing.T) {
{
Path: "/geo/proxy/info_refs_receive_pack",
Handler: func(w http.ResponseWriter, r *http.Request) {
- b, err := ioutil.ReadAll(r.Body)
+ b, err := io.ReadAll(r.Body)
require.NoError(t, err)
var request *Request
@@ -39,7 +39,7 @@ func TestExecuteEOFSent(t *testing.T) {
{
Path: "/geo/proxy/receive_pack",
Handler: func(w http.ResponseWriter, r *http.Request) {
- b, err := ioutil.ReadAll(r.Body)
+ b, err := io.ReadAll(r.Body)
require.NoError(t, err)
var request *Request
@@ -92,7 +92,7 @@ func TestExecuteNoEOFSent(t *testing.T) {
{
Path: "/geo/proxy/info_refs_upload_pack",
Handler: func(w http.ResponseWriter, r *http.Request) {
- b, err := ioutil.ReadAll(r.Body)
+ b, err := io.ReadAll(r.Body)
require.NoError(t, err)
var request *Request
@@ -108,7 +108,7 @@ func TestExecuteNoEOFSent(t *testing.T) {
{
Path: "/geo/proxy/upload_pack",
Handler: func(w http.ResponseWriter, r *http.Request) {
- b, err := ioutil.ReadAll(r.Body)
+ b, err := io.ReadAll(r.Body)
require.NoError(t, err)
var request *Request