Skip to content

Commit

Permalink
Merge pull request #33 from shaior/talm_test
Browse files Browse the repository at this point in the history
Add AfterEach
  • Loading branch information
mcornea authored Oct 30, 2023
2 parents 3646b22 + 12cd832 commit 743f034
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 743f034

Please sign in to comment.