I have the following Ginkgo
test file:
package foo
import (
"log"
. "github.com/onsi/ginkgo"
)
var _ = BeforeSuite(func() {
log.Print("BeforeSuite")
})
var _ = AfterSuite(func() {
log.Print("AfterSuite")
})
var _ = Describe("Foo", func() {
log.Print("Describe")
})
When I run ginkgo -r -v
, the test file runs, but the BeforeSuite
and AfterSuite
do not appear to:
2016/03/16 09:23:17 Describe
testing: warning: no tests to run
PASS
The line 2016/03/16 09:23:17 Describe
shows that the Describe
is running, but where is the output for BeforeSuite
and AfterSuite
?
I do not really care about the output, but in my real test (not the fragment above), database build up and tear down are not getting executed.
What am I doing wrong?