File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,7 @@ func TearDown(namespace string) {
391
391
var (
392
392
clientCtx = context .Background ()
393
393
client = ctx .Ctx ().Client ()
394
+ dynamic = ctx .Ctx ().DynamicClient ()
394
395
inNamespace = k8scontrollerclient .InNamespace (namespace )
395
396
logf = ctx .Ctx ().Logf
396
397
)
@@ -403,14 +404,13 @@ func TearDown(namespace string) {
403
404
return client .DeleteAllOf (clientCtx , & operatorsv1alpha1.Subscription {}, inNamespace )
404
405
}).Should (Succeed (), "failed to delete test subscriptions" )
405
406
406
- Eventually ( func () ( remaining []operatorsv1alpha1. Subscription , err error ) {
407
- list := & operatorsv1alpha1. SubscriptionList {}
408
- err = client . List (clientCtx , list , inNamespace )
409
- if list != nil {
410
- remaining = list . Items
407
+ var subscriptiongvr = schema. GroupVersionResource { Group : "operators.coreos.com" , Version : "v1alpha1" , Resource : "subscriptions" }
408
+ Eventually ( func () ([]unstructured. Unstructured , error ) {
409
+ list , err := dynamic . Resource ( subscriptiongvr ). Namespace ( namespace ). List (context . Background (), metav1. ListOptions {} )
410
+ if err != nil {
411
+ return nil , err
411
412
}
412
-
413
- return
413
+ return list .Items , nil
414
414
}).Should (BeEmpty (), "failed to await deletion of test subscriptions" )
415
415
416
416
logf ("deleting test installplans..." )
You can’t perform that action at this time.
0 commit comments