@@ -35,13 +35,13 @@ import (
35
35
)
36
36
37
37
var _ = Describe ("Controllerutil" , func () {
38
- Describe ("EnsureOwnerReference " , func () {
38
+ Describe ("SetOwnerReference " , func () {
39
39
It ("should set ownerRef on an empty list" , func () {
40
40
rs := & appsv1.ReplicaSet {}
41
41
dep := & extensionsv1beta1.Deployment {
42
42
ObjectMeta : metav1.ObjectMeta {Name : "foo" , UID : "foo-uid" },
43
43
}
44
- Expect (controllerutil .EnsureOwnerReference (dep , rs , scheme .Scheme )).ToNot (HaveOccurred ())
44
+ Expect (controllerutil .SetOwnerReference (dep , rs , scheme .Scheme )).ToNot (HaveOccurred ())
45
45
Expect (rs .OwnerReferences ).To (ConsistOf (metav1.OwnerReference {
46
46
Name : "foo" ,
47
47
Kind : "Deployment" ,
@@ -67,7 +67,7 @@ var _ = Describe("Controllerutil", func() {
67
67
ObjectMeta : metav1.ObjectMeta {Name : "foo" , UID : "foo-uid" },
68
68
}
69
69
70
- Expect (controllerutil .EnsureOwnerReference (dep , rs , scheme .Scheme )).ToNot (HaveOccurred ())
70
+ Expect (controllerutil .SetOwnerReference (dep , rs , scheme .Scheme )).ToNot (HaveOccurred ())
71
71
Expect (rs .OwnerReferences ).To (ConsistOf (metav1.OwnerReference {
72
72
Name : "foo" ,
73
73
Kind : "Deployment" ,
@@ -93,7 +93,7 @@ var _ = Describe("Controllerutil", func() {
93
93
ObjectMeta : metav1.ObjectMeta {Name : "foo" , UID : "foo-uid-2" },
94
94
}
95
95
96
- Expect (controllerutil .EnsureOwnerReference (dep , rs , scheme .Scheme )).ToNot (HaveOccurred ())
96
+ Expect (controllerutil .SetOwnerReference (dep , rs , scheme .Scheme )).ToNot (HaveOccurred ())
97
97
Expect (rs .OwnerReferences ).To (ConsistOf (metav1.OwnerReference {
98
98
Name : "foo" ,
99
99
Kind : "Deployment" ,
0 commit comments