File tree 3 files changed +8
-8
lines changed
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -39,5 +39,6 @@ type KinesisFirehoseRecordMetadata struct {
39
39
ShardID string `json:"shardId"`
40
40
PartitionKey string `json:"partitionKey"`
41
41
SequenceNumber string `json:"sequenceNumber"`
42
+ SubsequenceNumber string `json:"subsequenceNumber"`
42
43
ApproximateArrivalTimestamp MilliSecondsEpochTime `json:"approximateArrivalTimestamp"`
43
44
}
Original file line number Diff line number Diff line change @@ -11,20 +11,19 @@ import (
11
11
"github.com/stretchr/testify/assert"
12
12
)
13
13
14
- func testFirehoseEventMarshaling (t * testing.T ) {
15
- testMarshaling (t , "./testdata/kinesis-firehose-event.json" )
14
+ func TestFirehoseEventMarshaling (t * testing.T ) {
15
+ testMarshaling (t , & KinesisFirehoseEvent {}, "./testdata/kinesis-firehose-event.json" )
16
16
}
17
17
18
- func testFirehoseResponseMarshaling (t * testing.T ) {
19
- testMarshaling (t , "./testdata/kinesis-firehose-response.json" )
18
+ func TestFirehoseResponseMarshaling (t * testing.T ) {
19
+ testMarshaling (t , & KinesisFirehoseResponse {}, "./testdata/kinesis-firehose-response.json" )
20
20
}
21
21
22
- func testMarshaling (t * testing.T , jsonFile string ) {
22
+ func testMarshaling (t * testing.T , inputEvent interface {}, jsonFile string ) {
23
23
// 1. read JSON from file
24
24
inputJson := test .ReadJSONFromFile (t , jsonFile )
25
25
26
26
// 2. de-serialize into Go object
27
- var inputEvent KinesisFirehoseEvent
28
27
if err := json .Unmarshal (inputJson , & inputEvent ); err != nil {
29
28
t .Errorf ("could not unmarshal event. details: %v" , err )
30
29
}
Original file line number Diff line number Diff line change 13
13
"partitionKey" : " 4d1ad2b9-24f8-4b9d-a088-76e9947c317a" ,
14
14
"approximateArrivalTimestamp" : 1507217624302 ,
15
15
"sequenceNumber" : " 49546986683135544286507457936321625675700192471156785154" ,
16
- "subsequenceNumber" : " "
16
+ "subsequenceNumber" : " 123456 "
17
17
}
18
18
},
19
19
{
25
25
"partitionKey" : " 4d1ad2b9-24f8-4b9d-a088-76e9947c318a" ,
26
26
"approximateArrivalTimestamp" : 1507217624302 ,
27
27
"sequenceNumber" : " 49546986683135544286507457936321625675700192471156785155" ,
28
- "subsequenceNumber" : " "
28
+ "subsequenceNumber" : " 123457 "
29
29
}
30
30
}
31
31
]
You can’t perform that action at this time.
0 commit comments