Skip to content

Commit

Permalink
Add test to check if log folder created
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangmirs authored and Gut committed Jul 5, 2021
1 parent ab8a7e2 commit 515af86
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cmd/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,4 +274,20 @@ var _ = Describe("Create template", func() {
Expect(content).To(ContainSubstring(expectedContent))
})
})

Context("given logrus add-on", func() {
It("contains helpers/log folder", func() {
_, err := os.Stat("helpers/log")

Expect(os.IsNotExist(err)).To(BeFalse())
})

It("contains logrus package in go.mod", func() {
content := tests.ReadFile("go.mod")

expectedContent := "github.com/sirupsen/logrus v1.8.1"

Expect(content).To(ContainSubstring(expectedContent))
})
})
})

0 comments on commit 515af86

Please sign in to comment.