I have a bunch of custom assert functions that currently take either *testing.T or testing.TB, and I recently realized I cannot use any of them with assert.EventuallyWithT which we started using more heavily in our e2e tests, because the assert.CollectT is a concrete type that does not implement testing.TB. Obviously for the things we use that currently take a *testing.T we could update to a testing.TB but that doesn't fix the issue since CollectT doesn't implement testing.TB.
I'm wondering what kind of options we have to solve this. My current idea is maybe to just copying the current implementation of both assert.CollectT and assert.EventuallyWithT and adapt the CollectT implementation to implement testing.TB, but the interface is pretty large and I can see it might not play well with the requirements for a CollectT, so it doesn't seem trivial to do that.
I'm open to ideas, and of course I'd prefer if testify could fix this issue, but from my scanning of the GH issues around the assert.TestingT interface, the tHelper() interface and assert.CollectT types, it seems like fixing this directly isn't feasible without a huge rearchitecture of testify itself, so I'm open to writing my own functions to make this work.
I have a bunch of custom assert functions that currently take either
*testing.Tortesting.TB, and I recently realized I cannot use any of them withassert.EventuallyWithTwhich we started using more heavily in our e2e tests, because theassert.CollectTis a concrete type that does not implementtesting.TB. Obviously for the things we use that currently take a*testing.Twe could update to atesting.TBbut that doesn't fix the issue sinceCollectTdoesn't implementtesting.TB.I'm wondering what kind of options we have to solve this. My current idea is maybe to just copying the current implementation of both
assert.CollectTandassert.EventuallyWithTand adapt theCollectTimplementation to implementtesting.TB, but the interface is pretty large and I can see it might not play well with the requirements for aCollectT, so it doesn't seem trivial to do that.I'm open to ideas, and of course I'd prefer if testify could fix this issue, but from my scanning of the GH issues around the
assert.TestingTinterface, thetHelper()interface andassert.CollectTtypes, it seems like fixing this directly isn't feasible without a huge rearchitecture of testify itself, so I'm open to writing my own functions to make this work.