Skip to content

Commit

Permalink
Avoid deletion with foreground policy in test
Browse files Browse the repository at this point in the history
Foreground propagation propagation relies on a finalizer, which
interacts with the operator's finalizer in such a way that prevents
deletion indefinitely and for tests to time out (I'm not sure exactly
why to be honest, that's just what I observe). It shouldn't be
necessary, since the test code in question goes on to wait for the
deletion to have taken effect anyway.

Signed-off-by: Michael Bridgen <[email protected]>
  • Loading branch information
squaremo committed Sep 13, 2022
1 parent 8f69a7d commit 6eda2fe
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/stack_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,11 @@ var _ = Describe("Stack Controller", func() {

AfterEach(func() {
By("Deleting left over stacks")
deletionPolicy := metav1.DeletePropagationForeground
Expect(k8sClient.DeleteAllOf(
ctx,
&pulumiv1alpha1.Stack{},
client.InNamespace(namespace),
&client.DeleteAllOfOptions{
DeleteOptions: client.DeleteOptions{PropagationPolicy: &deletionPolicy},
},
&client.DeleteAllOfOptions{},
)).Should(Succeed())

Eventually(func() bool {
Expand Down

0 comments on commit 6eda2fe

Please sign in to comment.