easy changes

Kubernetes-commit: 3fa7b7824abbf3daec1189b118b91b5bb726958f
This commit is contained in:
Chao Xu
2017-04-26 17:13:48 -07:00
committed by Kubernetes Publisher
parent 670b68600e
commit cf012f20d0
26 changed files with 114 additions and 80 deletions

View File

@@ -31,6 +31,7 @@ go_library(
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library",
"//vendor/k8s.io/client-go/pkg/api:go_default_library",
"//vendor/k8s.io/client-go/pkg/api/v1:go_default_library",
],

View File

@@ -27,7 +27,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/pkg/api/v1"
)
@@ -153,7 +153,7 @@ func (f *FakeControllerSource) getListItemsLocked() ([]runtime.Object, error) {
// Otherwise, if they make a change and write it back, they
// will inadvertently change our canonical copy (in
// addition to racing with other clients).
objCopy, err := api.Scheme.DeepCopy(obj)
objCopy, err := scheme.Scheme.DeepCopy(obj)
if err != nil {
return nil, err
}
@@ -170,7 +170,7 @@ func (f *FakeControllerSource) List(options metav1.ListOptions) (runtime.Object,
if err != nil {
return nil, err
}
listObj := &api.List{}
listObj := &v1.List{}
if err := meta.SetList(listObj, list); err != nil {
return nil, err
}
@@ -242,7 +242,7 @@ func (f *FakeControllerSource) Watch(options metav1.ListOptions) (watch.Interfac
// it back, they will inadvertently change the our
// canonical copy (in addition to racing with other
// clients).
objCopy, err := api.Scheme.DeepCopy(c.Object)
objCopy, err := scheme.Scheme.DeepCopy(c.Object)
if err != nil {
return nil, err
}

View File

@@ -22,7 +22,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/api/v1"
)
@@ -76,7 +75,7 @@ func TestRCNumber(t *testing.T) {
if err != nil {
t.Fatalf("Unexpected error: %v", err)
}
if e, a := "3", list.(*api.List).ResourceVersion; e != a {
if e, a := "3", list.(*v1.List).ResourceVersion; e != a {
t.Errorf("wanted %v, got %v", e, a)
}