Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
Remove test files after running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitsakala committed Apr 29, 2020
1 parent 0d9d8d1 commit 9d8fa68
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/kube/controllers/quarksjob/output_persistor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ var _ = Describe("OutputPersistor", func() {
})
})
})

JustAfterEach(func() {
Expect(os.RemoveAll(tmpDir)).ToNot(HaveOccurred())
})
})

Context("when persisting multiple outputs", func() {
Expand Down Expand Up @@ -326,6 +330,9 @@ var _ = Describe("OutputPersistor", func() {

Context("With a failed Job", func() {
BeforeEach(func() {
err := ioutil.WriteFile(filepath.Join(tmpDir, "busybox", "output.json"), dataJSON, 0755)
Expect(err).NotTo(HaveOccurred())

pod.Status.ContainerStatuses = []corev1.ContainerStatus{
{
Name: "busybox",
Expand Down Expand Up @@ -355,6 +362,10 @@ var _ = Describe("OutputPersistor", func() {
Expect(err).NotTo(HaveOccurred())
})
})

AfterEach(func() {
Expect(os.RemoveAll(tmpDir)).ToNot(HaveOccurred())
})
})
})
})

0 comments on commit 9d8fa68

Please sign in to comment.