Commit 1ff0b422 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #35664 from ymqytw/update_drain_test

Automatic merge from submit-queue Update drain test Update how int convert to string in the kubectl drain test. It is safer to use `strconv.Itoa()` than `string()`.
parents 8e213a4a 08d4d8db
......@@ -26,6 +26,7 @@ import (
"net/url"
"os"
"reflect"
"strconv"
"strings"
"testing"
"time"
......@@ -658,11 +659,11 @@ func createPods(ifCreateNewPods bool) (map[string]api.Pod, []api.Pod) {
if ifCreateNewPods {
uid = types.UID(i)
} else {
uid = types.UID(string(i) + string(i))
uid = types.UID(strconv.Itoa(i) + strconv.Itoa(i))
}
pod := api.Pod{
ObjectMeta: api.ObjectMeta{
Name: "pod" + string(i),
Name: "pod" + strconv.Itoa(i),
Namespace: "default",
UID: uid,
Generation: int64(i),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment