Fix int->string casts
Kubernetes-commit: 124a5ddf725c4862520d8619017cac9db7a03522
This commit is contained in:
		
							parent
							
								
									7eedd3775c
								
							
						
					
					
						commit
						82cc7882ad
					
				|  | @ -17,11 +17,12 @@ limitations under the License. | ||||||
| package create | package create | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
|  | 	"strconv" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	rbac "k8s.io/api/rbac/v1" | 	rbac "k8s.io/api/rbac/v1" | ||||||
| 	apiequality "k8s.io/apimachinery/pkg/api/equality" | 	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) { | func TestCreateClusterRoleBinding(t *testing.T) { | ||||||
|  | @ -72,7 +73,7 @@ func TestCreateClusterRoleBinding(t *testing.T) { | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	for i, tc := range tests { | 	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() | 			clusterRoleBinding, err := tc.options.createClusterRoleBinding() | ||||||
| 			if err != nil { | 			if err != nil { | ||||||
| 				t.Errorf("unexpected error:\n%#v\n", err) | 				t.Errorf("unexpected error:\n%#v\n", err) | ||||||
|  |  | ||||||
|  | @ -196,7 +196,7 @@ func createPods(ifCreateNewPods bool) (map[string]corev1.Pod, []corev1.Pod) { | ||||||
| 	for i := 0; i < 8; i++ { | 	for i := 0; i < 8; i++ { | ||||||
| 		var uid types.UID | 		var uid types.UID | ||||||
| 		if ifCreateNewPods { | 		if ifCreateNewPods { | ||||||
| 			uid = types.UID(i) | 			uid = types.UID(strconv.Itoa(i)) | ||||||
| 		} else { | 		} else { | ||||||
| 			uid = types.UID(strconv.Itoa(i) + strconv.Itoa(i)) | 			uid = types.UID(strconv.Itoa(i) + strconv.Itoa(i)) | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue