(b *testing.B)
| 56 | } |
| 57 | |
| 58 | func BenchmarkController(b *testing.B) { |
| 59 | ctx := context.Background() |
| 60 | k := kubernetesWithFakeClient(ctx, "10.0.0.0/24", true, "all") |
| 61 | |
| 62 | go k.APIConn.Run() |
| 63 | defer k.APIConn.Stop() |
| 64 | for !k.APIConn.HasSynced() { |
| 65 | time.Sleep(time.Millisecond) |
| 66 | } |
| 67 | |
| 68 | rw := &test.ResponseWriter{} |
| 69 | m := new(dns.Msg) |
| 70 | m.SetQuestion("svc1.testns.svc.cluster.local.", dns.TypeA) |
| 71 | |
| 72 | for b.Loop() { |
| 73 | k.ServeDNS(ctx, rw, m) |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | func TestEndpointsDisabled(t *testing.T) { |
| 78 | ctx := context.Background() |
nothing calls this directly
no test coverage detected
searching dependent graphs…