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

@@ -33,6 +33,7 @@ go_test(
deps = [
"//pkg/api/v1:go_default_library",
"//vendor:github.com/stretchr/testify/assert",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
],
)

View File

@@ -21,6 +21,7 @@ import (
"fmt"
"testing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/api/v1"
"github.com/stretchr/testify/assert"
@@ -134,7 +135,7 @@ func TestValidateValidHost(t *testing.T) {
// Test multi-container pod.
pod := &v1.Pod{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
ContainerAnnotationKeyPrefix + "init": ProfileNamePrefix + "foo-container",
ContainerAnnotationKeyPrefix + "test1": ProfileRuntimeDefault,
@@ -182,7 +183,7 @@ func getPodWithProfile(profile string) *v1.Pod {
}
}
return &v1.Pod{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Annotations: annotations,
},
Spec: v1.PodSpec{