You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where main_test.go contains the main entry point of the test suite, and the 2 sub packages a and b contains the actual tests.
Is that something we can achieve with ginkgo or is there a limitation with golang test framework/ginkgo in achieving this?
Currently when running this structure, anything inside a_test_.go and b_test.go are not invoked.
The text was updated successfully, but these errors were encountered:
yes this can be done and some projects (e.g. kubernetes) organize their tests in this way. The trick is to define your specs within the a and b packages:
- main_test.go
- a
- a.go //drop _test
- b
- b.go //drop _test
FWIW I personally don’t usually write tests this way and just give each package its own test suite and run ginkgo -r. But there are certainly cases on big projects where it makes sense to organize things this way.
We want to have the following structure:
Where main_test.go contains the main entry point of the test suite, and the 2 sub packages
a
andb
contains the actual tests.Is that something we can achieve with ginkgo or is there a limitation with golang test framework/ginkgo in achieving this?
Currently when running this structure, anything inside
a_test_.go
andb_test.go
are not invoked.The text was updated successfully, but these errors were encountered: