File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -974,7 +974,10 @@ func TestPatchHelper(t *testing.T) {
974
974
g .Expect (env .Delete (ctx , cluster )).To (Succeed ())
975
975
976
976
// Ensure cluster still exists & get Cluster with deletionTimestamp set
977
- g .Expect (env .Get (ctx , key , cluster )).To (Succeed ())
977
+ // Note: Using the APIReader to ensure we get the cluster with deletionTimestamp is set.
978
+ // This is realistic because finalizers are removed in reconcileDelete code and that is only
979
+ // run if the deletionTimestamp is set.
980
+ g .Expect (env .GetAPIReader ().Get (ctx , key , cluster )).To (Succeed ())
978
981
979
982
// Patch helper will first remove the finalizer and then it will get a not found error when
980
983
// trying to patch status. This test validates that the not found error is ignored.
You can’t perform that action at this time.
0 commit comments