Skip to content

Commit

Permalink
fix unit test bug in mongo pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
ruizeng committed Dec 3, 2015
1 parent 489b088 commit 1aee088
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pkg/mongo/recorder_test.go
Expand Up @@ -23,14 +23,19 @@ func TestRecorder(t *testing.T) {
deviceid := uint64(12345)
timestamp := uint64(time.Now().Unix() * 1000)

subdata := protocol.SubData{
Head: protocol.SubDataHead{1, 2, 3},
Params: tlvs,
}

subdatas := []protocol.SubData{}

subdatas = append(subdatas, subdata)

data := rpcs.ArgsPutData{
DeviceId: deviceid,
Timestamp: timestamp,
Sequence: 123,
Subdata: protocol.SubData{
Head: protocol.SubDataHead{1, 2, 3},
Params: tlvs,
},
Subdata: subdatas,
}

err = r.Insert(data)
Expand Down

0 comments on commit 1aee088

Please sign in to comment.