Skip to content

Commit

Permalink
Add AfterEach
Browse files Browse the repository at this point in the history
  • Loading branch information
shaior committed Oct 30, 2023
1 parent 3646b22 commit 12cd832
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/gitopsztp/talm/tests/talm_canary.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,22 @@ var _ = Describe("Talm Canary Tests", Ordered, Label("talmcanary"), func() {
Expect(err).ToNot(HaveOccurred())
})

AfterEach(func() {
// Cleanup everything
errList := talmhelper.CleanupTestResourcesOnClients(
clusterList,
talmhelper.CguName,
talmhelper.PolicyName,
talmhelper.Namespace,
talmhelper.PlacementBindingName,
talmhelper.PlacementRule,
talmhelper.PolicySetName,
talmhelper.CatalogSourceName)
Expect(errList).To(BeEmpty())

// Cleanup the temporary namespace
err := talmhelper.CleanupNamespace(clusterList, talmhelper.TemporaryNamespaceName)
Expect(err).ToNot(HaveOccurred())
})

})

0 comments on commit 12cd832

Please sign in to comment.