Skip to content

Commit 012bb90

Browse files
committed
dev: Update test package name
1 parent 1b8e814 commit 012bb90

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

pkg/iterator/iterator_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package iterator
15+
package iterator_test
1616

1717
import (
1818
"bytes"
@@ -22,10 +22,11 @@ import (
2222

2323
"github.com/smartystreets/assertions"
2424
"github.com/smartystreets/assertions/should"
25+
"go.thethings.network/lorawan-stack-migrate/pkg/iterator"
2526
)
2627

2728
func TestListIterator(t *testing.T) {
28-
it := NewListIterator([]string{"one", "two", "three"})
29+
it := iterator.NewListIterator([]string{"one", "two", "three"})
2930
a := assertions.New(t)
3031

3132
s, err := it.Next()
@@ -49,7 +50,7 @@ func TestListIterator(t *testing.T) {
4950
func TestReaderIterator(t *testing.T) {
5051
for _, sep := range []string{"\n", "\r\n"} {
5152
buf := []byte(strings.Join([]string{"one", "two", "three"}, sep))
52-
it := NewReaderIterator(bytes.NewBuffer(buf), '\n')
53+
it := iterator.NewReaderIterator(bytes.NewBuffer(buf), '\n')
5354
a := assertions.New(t)
5455

5556
s, err := it.Next()

pkg/source/firefly/source.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (s Source) ExportDevice(devEUIString string) (*ttnpb.EndDevice, error) {
9898
JoinEui: joinEUI.Bytes(),
9999
},
100100
MacSettings: &ttnpb.MACSettings{
101-
Rx2DataRateIndex: &ttnpb.DataRateIndexValue{Value: ttnpb.DataRateIndex(ffdev.Rx2DataRate)},
101+
DesiredRx2DataRateIndex: &ttnpb.DataRateIndexValue{Value: ttnpb.DataRateIndex(ffdev.Rx2DataRate)},
102102
},
103103
SupportsClassC: ffdev.ClassC,
104104
SupportsJoin: ffdev.OTAA,
@@ -115,14 +115,6 @@ func (s Source) ExportDevice(devEUIString string) (*ttnpb.EndDevice, error) {
115115
}
116116
s.src.Logger.Debugw("Set location", "location", v3dev.Locations)
117117
}
118-
v3dev.Ids.DevEui, err = util.UnmarshalTextToBytes(&types.EUI64{}, ffdev.EUI)
119-
if err != nil {
120-
return nil, err
121-
}
122-
v3dev.Ids.JoinEui, err = util.UnmarshalTextToBytes(&types.EUI64{}, s.joinEUI)
123-
if err != nil {
124-
return nil, err
125-
}
126118
if v3dev.SupportsJoin {
127119
v3dev.RootKeys = &ttnpb.RootKeys{AppKey: &ttnpb.KeyEnvelope{}}
128120
v3dev.RootKeys.AppKey.Key, err = util.UnmarshalTextToBytes(&types.AES128Key{}, ffdev.ApplicationKey)

0 commit comments

Comments
 (0)