In addition, Session satisfies the gbytes.BufferProvider interface and provides the stdout *gbytes.Buffer. This allows you to replace the first line, above, with:
Expect(session).Should(gbytes.Say("foo-out"))
However, ginkgolinter reports an error when using a function returning a session as an Eventually argument:
foo_test.go:20:3: ginkgo-linter: use a function call in Eventually. This actually checks nothing, because Eventually receives the function returned value, instead of function itself, and this value is never changed; consider using `Eventually(createSession).Should(Exit())` instead
To Reproduce
Steps to reproduce the behavior:
Run ginkgo linter on the sample above
Expected behavior
The linter should not produce an error
Describe the bug According to gexec.Session docs
However, ginkgolinter reports an error when using a function returning a session as an
Eventually
argument:Example:
Produces the following error:
To Reproduce Steps to reproduce the behavior:
Expected behavior The linter should not produce an error
Environment: