diff --git a/pkg/cmd/create/create_clusterrolebinding_test.go b/pkg/cmd/create/create_clusterrolebinding_test.go index 78b26c02..43834128 100644 --- a/pkg/cmd/create/create_clusterrolebinding_test.go +++ b/pkg/cmd/create/create_clusterrolebinding_test.go @@ -17,11 +17,12 @@ limitations under the License. package create import ( + "strconv" "testing" rbac "k8s.io/api/rbac/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func TestCreateClusterRoleBinding(t *testing.T) { @@ -72,7 +73,7 @@ func TestCreateClusterRoleBinding(t *testing.T) { } for i, tc := range tests { - t.Run(string(i), func(t *testing.T) { + t.Run(strconv.Itoa(i), func(t *testing.T) { clusterRoleBinding, err := tc.options.createClusterRoleBinding() if err != nil { t.Errorf("unexpected error:\n%#v\n", err) diff --git a/pkg/drain/drain_test.go b/pkg/drain/drain_test.go index ce0c0b63..46c5344a 100644 --- a/pkg/drain/drain_test.go +++ b/pkg/drain/drain_test.go @@ -196,7 +196,7 @@ func createPods(ifCreateNewPods bool) (map[string]corev1.Pod, []corev1.Pod) { for i := 0; i < 8; i++ { var uid types.UID if ifCreateNewPods { - uid = types.UID(i) + uid = types.UID(strconv.Itoa(i)) } else { uid = types.UID(strconv.Itoa(i) + strconv.Itoa(i)) }