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

Function TestStore

pkg/frequencyplans/frequencyplans_test.go:83–244  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestStore(t *testing.T) {
84 a := assertions.New(t)
85
86 store := frequencyplans.NewStore(fetch.NewMemFetcher(map[string][]byte{
87 "frequency-plans.yml": []byte(`- id: AS_923
88 description: South East Asia
89 base-frequency: 915
90 file: AS_923.yml
91 gateways: true
92- id: JP
93 base-id: AS_923
94 description: Japan
95 base-frequency: 915
96 file: JP.yml
97 gateways: true
98- id: KR
99 base-id: AS_923
100 description: South Korea
101 base-frequency: 915
102 file: KR.yml
103 gateways: true
104- id: EU_863_870
105 description: European Union
106 file: EU.yml
107 base-frequency: 868
108- id: US_915
109 description: United States
110 file: US_915.yml
111 base-frequency: 915
112 gateways: true
113- id: SA
114 base-id: AFRICA
115 description: South Africa
116 file: AS_923.yml
117 base-frequency: 868
118 gateways: false
119- id: CA
120 base-id: US_915
121 description: Canada
122 file: EU.yml
123 base-frequency: 915
124 gateways: false
125`),
126 "AS_923.yml": []byte(`band-id: AS_923
127uplink-channels:
128- frequency: 923000000
129`),
130 "US_915.yml": []byte(`invalid-yaml`),
131 "JP.yml": []byte(`sub-bands:
132- min-frequency: 923000000
133 max-frequency: 923000000
134 max-eirp: 42
135listen-before-talk:
136 rssi-target: 1.1
137 rssi-offset: 2.2
138 scan-time: 80
139dwell-time:
140 uplinks: true

Callers

nothing calls this directly

Calls 8

GetAllIDsMethod · 0.95
GetByIDMethod · 0.95
NewStoreFunction · 0.92
NewMemFetcherFunction · 0.92
IsDataLossFunction · 0.92
IsNotFoundFunction · 0.92
NewMethod · 0.65
FindSubBandMethod · 0.45

Tested by

no test coverage detected