Skip to content

Commit

Permalink
Use io.ReadAll instead of ioutil.ReadAll
Browse files Browse the repository at this point in the history
  • Loading branch information
svanharmelen committed Jul 19, 2023
1 parent dcd9e05 commit 3c1f9bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions job_token_scope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package gitlab
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"testing"

Expand Down Expand Up @@ -55,7 +55,7 @@ func TestAddProjectToJobScopeAllowList(t *testing.T) {
testMethod(t, r, http.MethodPost)

// Read the request to determine which target project is passed in
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
if err != nil {
t.Fatalf("JobTokenScope.AddProjectToJobScopeAllowList failed to read body")
}
Expand Down Expand Up @@ -98,7 +98,7 @@ func TestRemoveProjectFromJobScopeAllowList(t *testing.T) {
testMethod(t, r, http.MethodDelete)

// Read the request to determine which target project is passed in
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
if err != nil {
t.Fatalf("JobTokenScope.RemoveProjectFromJobScopeAllowList failed to read body")
}
Expand Down

0 comments on commit 3c1f9bf

Please sign in to comment.