Member-only story
Automation Test
Ginkgo detected a panic while constructing the test tree
[38;5;243m/api-testing/gt-mvp/aaa/bbb/c_test.go:28[0m
Ginkgo detected a panic while constructing the test tree.
You may be trying to make an assertion in the body of a container node
(i.e. [1mDescribe[0m, [1mContext[0m, or [1mWhen[0m).
Please ensure all assertions are inside leaf nodes such as [1mBeforeEach[0m,
[1mIt[0m, etc.
[1mHere's the content of the panic that was caught:[0m
[1m[38;5;9mYour Test Panicked[0m
[38;5;246mExpect(resp.StatusCode()).To(Equal(http.StatusOK))[0m
[38;5;243m/api-testing/gt-mvp/gtcommon/api/user.go:25[0m
When you, or your assertion library, calls Ginkgo's Fail(),
Ginkgo panics to prevent subsequent assertions from running.
Normally Ginkgo rescues this panic so you shouldn't see it.
However, if you make an assertion in a goroutine, Ginkgo can't capture the
panic.
To circumvent this, you should call
defer GinkgoRecover()
at the top of the goroutine that caused this panic.
Alternatively, you may have made an assertion outside of a Ginkgo
leaf node (e.g. in a container node or some out-of-band function) - please
move your assertion to
an appropriate Ginkgo node (e.g. a BeforeSuite, BeforeEach, It, etc...).
[1mLearn more at:[0m…