@@ -885,7 +885,7 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
885
885
})
886
886
Describe ("as an Informer" , func () {
887
887
Context ("with structured objects" , func () {
888
- It ("should be able to get informer for the object" , func (done Done ) {
888
+ It ("should be able to get informer for the object" , func () {
889
889
By ("getting a shared index informer for a pod" )
890
890
pod := & corev1.Pod {
891
891
ObjectMeta : metav1.ObjectMeta {
@@ -921,9 +921,8 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
921
921
922
922
By ("verifying the object is received on the channel" )
923
923
Eventually (out ).Should (Receive (Equal (pod )))
924
- close (done )
925
924
})
926
- It ("should be able to get an informer by group/version/kind" , func (done Done ) {
925
+ It ("should be able to get an informer by group/version/kind" , func () {
927
926
By ("getting an shared index informer for gvk = core/v1/pod" )
928
927
gvk := schema.GroupVersionKind {Group : "" , Version : "v1" , Kind : "Pod" }
929
928
sii , err := informerCache .GetInformerForKind (context .TODO (), gvk )
@@ -960,7 +959,6 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
960
959
961
960
By ("verifying the object is received on the channel" )
962
961
Eventually (out ).Should (Receive (Equal (pod )))
963
- close (done )
964
962
})
965
963
It ("should be able to index an object field then retrieve objects by that field" , func () {
966
964
By ("creating the cache" )
@@ -1030,7 +1028,7 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
1030
1028
})
1031
1029
})
1032
1030
Context ("with unstructured objects" , func () {
1033
- It ("should be able to get informer for the object" , func (done Done ) {
1031
+ It ("should be able to get informer for the object" , func () {
1034
1032
By ("getting a shared index informer for a pod" )
1035
1033
1036
1034
pod := & unstructured.Unstructured {
@@ -1072,7 +1070,6 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
1072
1070
1073
1071
By ("verifying the object is received on the channel" )
1074
1072
Eventually (out ).Should (Receive (Equal (pod )))
1075
- close (done )
1076
1073
}, 3 )
1077
1074
1078
1075
It ("should be able to index an object field then retrieve objects by that field" , func () {
@@ -1145,7 +1142,7 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
1145
1142
})
1146
1143
})
1147
1144
Context ("with metadata-only objects" , func () {
1148
- It ("should be able to get informer for the object" , func (done Done ) {
1145
+ It ("should be able to get informer for the object" , func () {
1149
1146
By ("getting a shared index informer for a pod" )
1150
1147
1151
1148
pod := & corev1.Pod {
@@ -1193,7 +1190,6 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
1193
1190
1194
1191
By ("verifying the object's metadata is received on the channel" )
1195
1192
Eventually (out ).Should (Receive (Equal (podMeta )))
1196
- close (done )
1197
1193
}, 3 )
1198
1194
1199
1195
It ("should be able to index an object field then retrieve objects by that field" , func () {
0 commit comments