(t *testing.T)
| 81 | } |
| 82 | |
| 83 | func 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 |
| 127 | uplink-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 |
| 135 | listen-before-talk: |
| 136 | rssi-target: 1.1 |
| 137 | rssi-offset: 2.2 |
| 138 | scan-time: 80 |
| 139 | dwell-time: |
| 140 | uplinks: true |
nothing calls this directly
no test coverage detected