Skip to content

Commit

Permalink
Add tests for none, off, null
Browse files Browse the repository at this point in the history
  • Loading branch information
goochjj committed Jun 10, 2020
1 parent d6e4931 commit b0ceaa0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions runner/conmon_test/conmon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,36 @@ var _ = Describe("conmon", func() {
_, err := os.Stat(tmpLogPath)
Expect(err).To(BeNil())
})
It("log driver as none should pass", func() {
_, stderr := getConmonOutputGivenOptions(
conmon.WithPath(conmonPath),
conmon.WithContainerID(ctrID),
conmon.WithContainerUUID(ctrID),
conmon.WithRuntimePath(validPath),
conmon.WithLogDriver("none", ""),
)
Expect(stderr).To(BeEmpty())
})
It("log driver as off should pass", func() {
_, stderr := getConmonOutputGivenOptions(
conmon.WithPath(conmonPath),
conmon.WithContainerID(ctrID),
conmon.WithContainerUUID(ctrID),
conmon.WithRuntimePath(validPath),
conmon.WithLogDriver("off", ""),
)
Expect(stderr).To(BeEmpty())
})
It("log driver as null should pass", func() {
_, stderr := getConmonOutputGivenOptions(
conmon.WithPath(conmonPath),
conmon.WithContainerID(ctrID),
conmon.WithContainerUUID(ctrID),
conmon.WithRuntimePath(validPath),
conmon.WithLogDriver("null", ""),
)
Expect(stderr).To(BeEmpty())
})
It("log driver as journald should pass", func() {
_, stderr := getConmonOutputGivenOptions(
conmon.WithPath(conmonPath),
Expand Down

0 comments on commit b0ceaa0

Please sign in to comment.