refactor: generated
This commit is contained in:
@@ -120,7 +120,7 @@ func setupGC(t *testing.T, config *restclient.Config) *GarbageCollector {
|
||||
return gc
|
||||
}
|
||||
|
||||
func getPod(podName string, ownerReferences []v1.OwnerReference) *v1.Pod {
|
||||
func getPod(podName string, ownerReferences []metav1.OwnerReference) *v1.Pod {
|
||||
return &v1.Pod{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: "Pod",
|
||||
@@ -144,7 +144,7 @@ func serilizeOrDie(t *testing.T, object interface{}) []byte {
|
||||
|
||||
// test the processItem function making the expected actions.
|
||||
func TestProcessItem(t *testing.T) {
|
||||
pod := getPod("ToBeDeletedPod", []v1.OwnerReference{
|
||||
pod := getPod("ToBeDeletedPod", []metav1.OwnerReference{
|
||||
{
|
||||
Kind: "ReplicationController",
|
||||
Name: "owner1",
|
||||
@@ -230,9 +230,9 @@ func verifyGraphInvariants(scenario string, uidToNode map[types.UID]*node, t *te
|
||||
}
|
||||
|
||||
func createEvent(eventType eventType, selfUID string, owners []string) event {
|
||||
var ownerReferences []v1.OwnerReference
|
||||
var ownerReferences []metav1.OwnerReference
|
||||
for i := 0; i < len(owners); i++ {
|
||||
ownerReferences = append(ownerReferences, v1.OwnerReference{UID: types.UID(owners[i])})
|
||||
ownerReferences = append(ownerReferences, metav1.OwnerReference{UID: types.UID(owners[i])})
|
||||
}
|
||||
return event{
|
||||
eventType: eventType,
|
||||
@@ -379,7 +379,7 @@ func podToGCNode(pod *v1.Pod) *node {
|
||||
}
|
||||
|
||||
func TestAbsentUIDCache(t *testing.T) {
|
||||
rc1Pod1 := getPod("rc1Pod1", []v1.OwnerReference{
|
||||
rc1Pod1 := getPod("rc1Pod1", []metav1.OwnerReference{
|
||||
{
|
||||
Kind: "ReplicationController",
|
||||
Name: "rc1",
|
||||
@@ -387,7 +387,7 @@ func TestAbsentUIDCache(t *testing.T) {
|
||||
APIVersion: "v1",
|
||||
},
|
||||
})
|
||||
rc1Pod2 := getPod("rc1Pod2", []v1.OwnerReference{
|
||||
rc1Pod2 := getPod("rc1Pod2", []metav1.OwnerReference{
|
||||
{
|
||||
Kind: "ReplicationController",
|
||||
Name: "rc1",
|
||||
@@ -395,7 +395,7 @@ func TestAbsentUIDCache(t *testing.T) {
|
||||
APIVersion: "v1",
|
||||
},
|
||||
})
|
||||
rc2Pod1 := getPod("rc2Pod1", []v1.OwnerReference{
|
||||
rc2Pod1 := getPod("rc2Pod1", []metav1.OwnerReference{
|
||||
{
|
||||
Kind: "ReplicationController",
|
||||
Name: "rc2",
|
||||
@@ -403,7 +403,7 @@ func TestAbsentUIDCache(t *testing.T) {
|
||||
APIVersion: "v1",
|
||||
},
|
||||
})
|
||||
rc3Pod1 := getPod("rc3Pod1", []v1.OwnerReference{
|
||||
rc3Pod1 := getPod("rc3Pod1", []metav1.OwnerReference{
|
||||
{
|
||||
Kind: "ReplicationController",
|
||||
Name: "rc3",
|
||||
|
Reference in New Issue
Block a user