Optimize authenticator oidc test

Signed-off-by: iutx <root@viper.run>

Kubernetes-commit: c21d33ab280f68176911e064ccff41ac2b96bbe3
This commit is contained in:
iutx 2022-09-22 20:50:34 +08:00 committed by Kubernetes Publisher
parent f6346f1d45
commit 70f028d4e0
1 changed files with 2 additions and 2 deletions

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)
}