MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / TestComponent

Function TestComponent

pkg/packetbrokeragent/agent_test.go:65–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

63)
64
65func TestComponent(t *testing.T) {
66 ctx := log.NewContext(test.Context(), test.GetLogger(t))
67
68 c := componenttest.NewComponent(t, &component.Config{})
69
70 test.Must(New(c, &Config{
71 AuthenticationMode: "oauth2",
72 }, testOptions...))
73 componenttest.StartComponent(t, c)
74 defer c.Close()
75
76 mustHavePeer(ctx, c, ttnpb.ClusterRole_PACKET_BROKER_AGENT)
77}
78
79func TestForwarder(t *testing.T) {
80 ctx := log.NewContext(test.Context(), test.GetLogger(t))

Callers

nothing calls this directly

Calls 7

CloseMethod · 0.95
NewContextFunction · 0.92
ContextFunction · 0.92
GetLoggerFunction · 0.92
MustFunction · 0.92
NewFunction · 0.70
mustHavePeerFunction · 0.70

Tested by

no test coverage detected