refactor: use metav1.ObjectMeta in other types

This commit is contained in:
Clayton Coleman
2017-01-16 22:38:19 -05:00
parent 5a5d31555b
commit 9a2a50cda7
822 changed files with 11914 additions and 9290 deletions

View File

@@ -19,8 +19,8 @@ package validation
import (
"testing"
"k8s.io/kubernetes/pkg/api"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/api"
)
func TestValidateEvent(t *testing.T) {
@@ -30,7 +30,7 @@ func TestValidateEvent(t *testing.T) {
}{
{
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test1",
Namespace: "foo",
},
@@ -42,7 +42,7 @@ func TestValidateEvent(t *testing.T) {
false,
}, {
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test2",
Namespace: "aoeu-_-aoeu",
},
@@ -54,7 +54,7 @@ func TestValidateEvent(t *testing.T) {
false,
}, {
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test3",
Namespace: api.NamespaceDefault,
},
@@ -66,7 +66,7 @@ func TestValidateEvent(t *testing.T) {
true,
}, {
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test4",
Namespace: api.NamespaceDefault,
},
@@ -78,7 +78,7 @@ func TestValidateEvent(t *testing.T) {
true,
}, {
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test5",
Namespace: api.NamespaceDefault,
},
@@ -91,7 +91,7 @@ func TestValidateEvent(t *testing.T) {
true,
}, {
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test6",
Namespace: api.NamespaceDefault,
},
@@ -104,7 +104,7 @@ func TestValidateEvent(t *testing.T) {
false,
}, {
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test7",
Namespace: api.NamespaceDefault,
},
@@ -117,7 +117,7 @@ func TestValidateEvent(t *testing.T) {
true,
}, {
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test8",
Namespace: api.NamespaceDefault,
},
@@ -130,7 +130,7 @@ func TestValidateEvent(t *testing.T) {
false,
}, {
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test9",
Namespace: "foo",
},
@@ -143,7 +143,7 @@ func TestValidateEvent(t *testing.T) {
true,
}, {
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test10",
Namespace: api.NamespaceDefault,
},
@@ -156,7 +156,7 @@ func TestValidateEvent(t *testing.T) {
false,
}, {
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test11",
Namespace: "foo",
},
@@ -171,7 +171,7 @@ func TestValidateEvent(t *testing.T) {
},
{
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test12",
Namespace: "foo",
},
@@ -185,7 +185,7 @@ func TestValidateEvent(t *testing.T) {
},
{
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test13",
Namespace: "",
},
@@ -199,7 +199,7 @@ func TestValidateEvent(t *testing.T) {
},
{
&api.Event{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "test14",
Namespace: "foo",
},