Merge pull request #112674 from iutx/optimize/oidc-test

Optimize authenticator oidc test
This commit is contained in:
Kubernetes Prow Robot 2022-09-24 17:40:04 -07:00 committed by GitHub
commit cac53883f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,9 +25,9 @@ import (
"encoding/json"
"encoding/pem"
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
"reflect"
"strings"
"testing"
@ -76,7 +76,7 @@ func loadECDSAPrivKey(t *testing.T, filepath string, alg jose.SignatureAlgorithm
}
func loadKey(t *testing.T, filepath string, alg jose.SignatureAlgorithm, unmarshal func([]byte) (interface{}, error)) *jose.JSONWebKey {
data, err := ioutil.ReadFile(filepath)
data, err := os.ReadFile(filepath)
if err != nil {
t.Fatalf("load file: %v", err)
}