func TestTCPPortExhaustion(t *testing.T) { … } func newProbe(handler v1.ProbeHandler) *v1.Probe { … } // newFakePod runs a server (TCP or HTTP) in a random port func newFakePod(httpServer bool) (*fakePod, error) { … } type fakePod … func (f *fakePod) probeHandler() v1.ProbeHandler { … } func (f *fakePod) stop() { … } func (f *fakePod) connections() int { … }