appc,ipn/ipnlocal: add a required event bus to the AppConnector type (#17390)
Require the presence of the bus, but do not use it yet. Check for required fields and update tests and production use to plumb the necessary arguments. Updates #15160 Updates #17192 Change-Id: I8cefd2fdb314ca9945317d3320bd5ea6a92e8dcb Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
This commit is contained in:
@@ -259,12 +259,17 @@ func TestPeerAPIPrettyReplyCNAME(t *testing.T) {
|
||||
if shouldStore {
|
||||
a = appc.NewAppConnector(appc.Config{
|
||||
Logf: t.Logf,
|
||||
EventBus: sys.Bus.Get(),
|
||||
RouteAdvertiser: &appctest.RouteCollector{},
|
||||
RouteInfo: &appc.RouteInfo{},
|
||||
StoreRoutesFunc: fakeStoreRoutes,
|
||||
})
|
||||
} else {
|
||||
a = appc.NewAppConnector(appc.Config{Logf: t.Logf, RouteAdvertiser: &appctest.RouteCollector{}})
|
||||
a = appc.NewAppConnector(appc.Config{
|
||||
Logf: t.Logf,
|
||||
EventBus: sys.Bus.Get(),
|
||||
RouteAdvertiser: &appctest.RouteCollector{},
|
||||
})
|
||||
}
|
||||
sys.Set(pm.Store())
|
||||
sys.Set(eng)
|
||||
@@ -339,12 +344,13 @@ func TestPeerAPIReplyToDNSQueriesAreObserved(t *testing.T) {
|
||||
if shouldStore {
|
||||
a = appc.NewAppConnector(appc.Config{
|
||||
Logf: t.Logf,
|
||||
EventBus: sys.Bus.Get(),
|
||||
RouteAdvertiser: rc,
|
||||
RouteInfo: &appc.RouteInfo{},
|
||||
StoreRoutesFunc: fakeStoreRoutes,
|
||||
})
|
||||
} else {
|
||||
a = appc.NewAppConnector(appc.Config{Logf: t.Logf, RouteAdvertiser: rc})
|
||||
a = appc.NewAppConnector(appc.Config{Logf: t.Logf, EventBus: sys.Bus.Get(), RouteAdvertiser: rc})
|
||||
}
|
||||
sys.Set(pm.Store())
|
||||
sys.Set(eng)
|
||||
@@ -411,12 +417,13 @@ func TestPeerAPIReplyToDNSQueriesAreObservedWithCNAMEFlattening(t *testing.T) {
|
||||
if shouldStore {
|
||||
a = appc.NewAppConnector(appc.Config{
|
||||
Logf: t.Logf,
|
||||
EventBus: sys.Bus.Get(),
|
||||
RouteAdvertiser: rc,
|
||||
RouteInfo: &appc.RouteInfo{},
|
||||
StoreRoutesFunc: fakeStoreRoutes,
|
||||
})
|
||||
} else {
|
||||
a = appc.NewAppConnector(appc.Config{Logf: t.Logf, RouteAdvertiser: rc})
|
||||
a = appc.NewAppConnector(appc.Config{Logf: t.Logf, EventBus: sys.Bus.Get(), RouteAdvertiser: rc})
|
||||
}
|
||||
sys.Set(pm.Store())
|
||||
sys.Set(eng)
|
||||
|
||||
Reference in New Issue
Block a user