switch some commands to use its own scheme

This commit is contained in:
ymqytw
2017-10-27 18:31:42 -07:00
parent 35468469eb
commit 4487cc5e15
64 changed files with 362 additions and 450 deletions

View File

@@ -20,19 +20,19 @@ import (
"reflect"
"testing"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/api"
)
func TestServiceAccountGenerate(t *testing.T) {
tests := []struct {
name string
expected *api.ServiceAccount
expected *v1.ServiceAccount
expectErr bool
}{
{
name: "foo",
expected: &api.ServiceAccount{
expected: &v1.ServiceAccount{
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
},
@@ -54,8 +54,8 @@ func TestServiceAccountGenerate(t *testing.T) {
if test.expectErr && err != nil {
continue
}
if !reflect.DeepEqual(obj.(*api.ServiceAccount), test.expected) {
t.Errorf("\nexpected:\n%#v\nsaw:\n%#v", test.expected, obj.(*api.ServiceAccount))
if !reflect.DeepEqual(obj.(*v1.ServiceAccount), test.expected) {
t.Errorf("\nexpected:\n%#v\nsaw:\n%#v", test.expected, obj.(*v1.ServiceAccount))
}
}
}