Skip to content

Commit

Permalink
tools/bumper: Remove entire test directory
Browse files Browse the repository at this point in the history
The tests creates a temporary test directory on every run.
Removing it after each test to prevent leftovers.

Signed-off-by: Ram Lavi <[email protected]>
  • Loading branch information
RamLavi committed Jan 16, 2025
1 parent 5995dfb commit 09764ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/bumper/cnao_repo_commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var _ = Describe("Testing internal git CNAO Repo", func() {
gitCnaoRepo = newFakeGitCnaoRepo(githubApi, repoDir, &component{}, expectedTagCommitMap)

DeferCleanup(func() {
Expect(os.RemoveAll(gitCnaoRepo.gitRepo.localDir)).To(Succeed())
Expect(os.RemoveAll(tempDir)).To(Succeed())
})
})

Expand Down
1 change: 1 addition & 0 deletions tools/bumper/component_commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var _ = Describe("Testing internal git component", func() {

DeferCleanup(func() {
Expect(os.RemoveAll(gitComponent.gitRepo.localDir)).To(Succeed())
Expect(os.RemoveAll(tempDir)).To(Succeed())
})
})

Expand Down

0 comments on commit 09764ad

Please sign in to comment.