mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 10:17:46 +00:00
refactor
This commit is contained in:
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package auth
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
@@ -84,7 +85,7 @@ func TestNodeAuthorizer(t *testing.T) {
|
||||
|
||||
// Wait for a healthy server
|
||||
for {
|
||||
result := superuserClient.CoreV1().RESTClient().Get().AbsPath("/healthz").Do()
|
||||
result := superuserClient.CoreV1().RESTClient().Get().AbsPath("/healthz").Do(context.TODO())
|
||||
_, err := result.Raw()
|
||||
if err == nil {
|
||||
break
|
||||
|
@@ -684,7 +684,7 @@ func TestBootstrapping(t *testing.T) {
|
||||
|
||||
t.Errorf("missing cluster-admin: %v", clusterRoles)
|
||||
|
||||
healthBytes, err := clientset.Discovery().RESTClient().Get().AbsPath("/healthz/poststarthook/rbac/bootstrap-roles").DoRaw()
|
||||
healthBytes, err := clientset.Discovery().RESTClient().Get().AbsPath("/healthz/poststarthook/rbac/bootstrap-roles").DoRaw(context.TODO())
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user