Skip to content

Commit

Permalink
refactor: clean up vendor directory after test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
crhntr committed Jul 20, 2023
1 parent 1f99498 commit 22eeb47
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions internal/commands/test_tile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ var _ = Describe("kiln test", func() {
Expect(output.String()).To(BeEmpty())
})
})
AfterEach(func() {
wd, err := os.Getwd()
if err != nil {
log.Fatal(err)
}
vendorDir := filepath.Join(filepath.Dir(filepath.Dir(wd)), "vendor")
if info, err := os.Stat(vendorDir); err == nil && info.IsDir() { // no error
_ = os.RemoveAll(vendorDir)
}
})

When("when the tile directory does not exist", func() {
It("runs all the tests with initalized collaborators", func() {
Expand Down

0 comments on commit 22eeb47

Please sign in to comment.