mirror of
https://github.com/tailscale/tailscale.git
synced 2025-09-21 05:31:36 +02:00
ipn/ipnlocal: check appc events in TestPeerAPIReplyToDNSQueriesAreObservedWithCNAMEFlattening
Change-Id: I49329feff2b32936f6aaec5c5a2722f89907f051
This commit is contained in:
parent
a6ff4f108a
commit
2636db2541
@ -398,6 +398,7 @@ func TestPeerAPIReplyToDNSQueriesAreObservedWithCNAMEFlattening(t *testing.T) {
|
|||||||
h.remoteAddr = netip.MustParseAddrPort("100.150.151.152:12345")
|
h.remoteAddr = netip.MustParseAddrPort("100.150.151.152:12345")
|
||||||
|
|
||||||
sys := tsd.NewSystemWithBus(eventbustest.NewBus(t))
|
sys := tsd.NewSystemWithBus(eventbustest.NewBus(t))
|
||||||
|
bw := eventbustest.NewWatcher(t, sys.Bus.Get())
|
||||||
|
|
||||||
ht := health.NewTracker(sys.Bus.Get())
|
ht := health.NewTracker(sys.Bus.Get())
|
||||||
reg := new(usermetric.Registry)
|
reg := new(usermetric.Registry)
|
||||||
@ -467,6 +468,12 @@ func TestPeerAPIReplyToDNSQueriesAreObservedWithCNAMEFlattening(t *testing.T) {
|
|||||||
if !slices.Equal(rc.Routes(), wantRoutes) {
|
if !slices.Equal(rc.Routes(), wantRoutes) {
|
||||||
t.Errorf("got %v; want %v", rc.Routes(), wantRoutes)
|
t.Errorf("got %v; want %v", rc.Routes(), wantRoutes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := eventbustest.Expect(bw,
|
||||||
|
eqUpdate(appc.RouteUpdate{Advertise: mustPrefix("192.0.0.8/32")}),
|
||||||
|
); err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user