mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
switch some commands to use its own scheme
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user