From 8e9ba610e65313465bff782176ab7b5a75e835bd Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 28 Jul 2021 22:58:00 +0900 Subject: [PATCH] Verify the deletion of the object when it is allowed Currently we confirm the deletion "when the client gets error". But we would get no error but object is still "terminating" status. So this patch changes the condition to "when Delete is allowed". --- test/user_permissions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/user_permissions.go b/test/user_permissions.go index 2fac8ce509..e4ba018137 100644 --- a/test/user_permissions.go +++ b/test/user_permissions.go @@ -56,7 +56,7 @@ func RunUserPermissionTests(t *testing.T, objects map[schema.GroupVersionResourc t.Errorf("Unexpected error deleting %s, allowed = %v, err = %v", gvr.String(), allowed.Delete, err) } - if err != nil { + if allowed.Delete { // If we've been able to delete the object we can assume we're able to get it as well. // Some objects take a while to be deleted, so we retry a few times. if err := wait.PollImmediate(Interval, Timeout, func() (bool, error) {