mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-10-28 17:45:52 +08:00
This makes the test helper code more flexible. In particular, passing a ktesting.TContext instance is okay: it implements all required methods, but isn't *testing.T and cannot implement testing.TB (private method). Instead of a new testutils.TB interface, ktesting.TB could have been used. This is not done because TContext usage should go together with other changes (for example, merging with ctx or client parameters and renaming to tCtx). That can be done later if desired. A potential downside of the custom interface, loosing printf checking, gets avoided by making the connection to testing.T visible.