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

Function TestGetTrust

pkg/basicstation/cups/server_test.go:43–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

41)
42
43func TestGetTrust(t *testing.T) {
44 a, ctx := test.New(t)
45
46 s, err := NewServer(ctx, componenttest.NewComponent(t, &component.Config{}), ServerConfig{})
47 if !a.So(err, should.BeNil) {
48 t.FailNow()
49 }
50
51 for _, addr := range []string{
52 "thethingsnetwork.org:443",
53 "https://thethingsnetwork.org:443",
54 "https://thethingsnetwork.org",
55 } {
56 cert, err := s.getTrust(addr)
57 a.So(err, should.BeNil)
58 a.So(cert, should.NotBeNil)
59 }
60}
61
62type mockGatewayClientData struct {
63 ctx struct {

Callers

nothing calls this directly

Calls 3

getTrustMethod · 0.95
NewFunction · 0.92
NewServerFunction · 0.70

Tested by

no test coverage detected