Skip to content

Commit

Permalink
fix: Update logs test args (#83)
Browse files Browse the repository at this point in the history
Issue #, if available:

*Description of changes:*
Changing values for `--since` and `--until` based on windows e2e
testing. For `--since` change from 3s=>5s(for logs to show up) to show
logs from [current time - 5s](i.e the container run falls within this
window). For `--until`, change from 3s=>5s(for logs not to show up), i.e
container start time does not happen between [0 - (current time -5s)]
*Testing done:*
Yes


- [X] I've reviewed the guidance in CONTRIBUTING.md


#### License Acceptance

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

Signed-off-by: Vishwas Siravara <[email protected]>
  • Loading branch information
vsiravar authored Sep 20, 2023
1 parent fa5eff3 commit 011c2e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ func Logs(o *option.Option) {
time.Sleep(2 * time.Second)
output := command.StdoutStr(o, "logs", "--since", "1s", testContainerName)
gomega.Expect(output).Should(gomega.BeEmpty())
output = command.StdoutStr(o, "logs", "--since", "3s", testContainerName)
output = command.StdoutStr(o, "logs", "--since", "5s", testContainerName)
gomega.Expect(output).Should(gomega.Equal(foo))
})

ginkgo.It("should show log message depending on a relative time with --until flag", func() {
time.Sleep(2 * time.Second)
output := command.StdoutStr(o, "logs", "--until", "1s", testContainerName)
gomega.Expect(output).Should(gomega.Equal(foo))
output = command.StdoutStr(o, "logs", "--until", "3s", testContainerName)
output = command.StdoutStr(o, "logs", "--until", "5s", testContainerName)
gomega.Expect(output).Should(gomega.BeEmpty())
})
})
Expand Down

0 comments on commit 011c2e3

Please sign in to comment.