Skip to content

Commit

Permalink
Fix cleanups in integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Rasheed Abdul-Aziz committed Nov 4, 2021
1 parent 73847fa commit f20228d
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions tests/integration/delivery/delivery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ var _ = Describe("Deliveries", func() {
ctx = context.Background()
})

AfterEach(func() {
for _, obj := range cleanups {
_ = c.Delete(ctx, obj, &client.DeleteOptions{})
}
})

Describe("I can define a delivery with a resource", func() {
BeforeEach(func() {
deliveryYaml := utils.HereYaml(`
Expand All @@ -64,12 +70,6 @@ var _ = Describe("Deliveries", func() {
Expect(err).NotTo(HaveOccurred())
})

AfterEach(func() {
for _, obj := range cleanups {
_ = c.Delete(ctx, obj, &client.DeleteOptions{})
}
})

Context("the referenced resource exists", func() {
BeforeEach(func() {
clusterSourceTemplateYaml := utils.HereYaml(`
Expand Down Expand Up @@ -315,11 +315,6 @@ var _ = Describe("Deliveries", func() {
)
})

AfterEach(func() {
for _, obj := range cleanups {
_ = c.Delete(ctx, obj, &client.DeleteOptions{})
}
})

Context("a change to the delivery occurs that does not cause the status to change", func() {
var conditionsBeforeMutation []metav1.Condition
Expand Down

0 comments on commit f20228d

Please sign in to comment.