remove duplicated import and wrong alias name of api package

This commit is contained in:
supereagle
2017-07-15 13:25:54 +08:00
parent d368afd845
commit adc0eef43e
57 changed files with 166 additions and 211 deletions

View File

@@ -24,7 +24,6 @@ import (
autoscalingv2 "k8s.io/api/autoscaling/v2alpha1"
"k8s.io/api/core/v1"
clientv1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
@@ -158,8 +157,8 @@ func (tc *replicaCalcTestCase) prepareTestClient(t *testing.T) (*fake.Clientset,
for i := 0; i < numContainersPerPod; i++ {
podMetric.Containers[i] = metricsapi.ContainerMetrics{
Name: fmt.Sprintf("container%v", i),
Usage: clientv1.ResourceList{
clientv1.ResourceName(tc.resource.name): *resource.NewMilliQuantity(
Usage: v1.ResourceList{
v1.ResourceName(tc.resource.name): *resource.NewMilliQuantity(
int64(resValue),
resource.DecimalSI),
},
@@ -194,7 +193,7 @@ func (tc *replicaCalcTestCase) prepareTestClient(t *testing.T) (*fake.Clientset,
for i, level := range tc.metric.levels {
podMetric := cmapi.MetricValue{
DescribedObject: clientv1.ObjectReference{
DescribedObject: v1.ObjectReference{
Kind: "Pod",
Name: fmt.Sprintf("%s-%d", podNamePrefix, i),
Namespace: testNamespace,
@@ -224,7 +223,7 @@ func (tc *replicaCalcTestCase) prepareTestClient(t *testing.T) (*fake.Clientset,
metrics.Items = []cmapi.MetricValue{
{
DescribedObject: clientv1.ObjectReference{
DescribedObject: v1.ObjectReference{
Kind: tc.metric.singleObject.Kind,
APIVersion: tc.metric.singleObject.APIVersion,
Name: name,