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

Function newTLSServer

pkg/interop/util_test.go:95–105  ·  view source on GitHub ↗
(port int, hdl http.Handler)

Source from the content-addressed store, hash-verified

93}
94
95func newTLSServer(port int, hdl http.Handler) *httptest.Server {
96 lis, err := net.Listen("tcp", fmt.Sprintf("127.0.0.1:%d", port))
97 if err != nil {
98 panic(err)
99 }
100 srv := httptest.NewUnstartedServer(hdl)
101 srv.Listener = lis
102 srv.TLS = makeServerTLSConfig()
103 srv.StartTLS()
104 return srv
105}
106
107func makePacketBrokerTokenIssuer(ctx context.Context, subject string) (iss string, tok func(aud string) string) {
108 public, private, err := ed25519.GenerateKey(nil)

Callers 4

TestServerFunction · 0.85
TestGetAppSKeyFunction · 0.85
TestHandleJoinRequestFunction · 0.85
TestJoinServerRaceFunction · 0.85

Calls 2

makeServerTLSConfigFunction · 0.85
ListenMethod · 0.65

Tested by

no test coverage detected