@@ -152,8 +152,6 @@ func fixture(name string) string {
152
152
return string (b )
153
153
}
154
154
155
- func mockId () string { return "I'm unique" }
156
-
157
155
func mockTime () time.Time {
158
156
// time.Unix(0, 0) fails on Circle
159
157
return time .Date (2009 , time .November , 10 , 23 , 0 , 0 , 0 , time .UTC )
@@ -191,11 +189,11 @@ func ExampleCapture() {
191
189
Endpoint : server .URL ,
192
190
BatchSize : 1 ,
193
191
now : mockTime ,
194
- uid : mockId ,
195
192
})
196
193
defer client .Close ()
197
194
198
195
client .Enqueue (Capture {
196
+ Uuid : "00000000-0000-0000-0000-000000000000" ,
199
197
Event : "Download" ,
200
198
DistinctId : "123456" ,
201
199
Properties : Properties {
@@ -225,7 +223,8 @@ func ExampleCapture() {
225
223
// },
226
224
// "send_feature_flags": false,
227
225
// "timestamp": "2009-11-10T23:00:00Z",
228
- // "type": "capture"
226
+ // "type": "capture",
227
+ // "uuid": "00000000-0000-0000-0000-000000000000"
229
228
// }
230
229
// ]
231
230
// }
@@ -246,7 +245,6 @@ func TestCaptureNoProperties(t *testing.T) {
246
245
Endpoint : server .URL ,
247
246
BatchSize : 1 ,
248
247
now : mockTime ,
249
- uid : mockId ,
250
248
DefaultEventProperties : NewProperties ().Set ("service" , "api" ),
251
249
})
252
250
defer client .Close ()
@@ -323,8 +321,9 @@ func TestEnqueue(t *testing.T) {
323
321
},
324
322
325
323
"*capture" : {
326
- strings .TrimSpace (fixture ("test-enqueue-capture.json" )),
324
+ strings .TrimSpace (fixture ("test-enqueue-capture-with-uuid .json" )),
327
325
& Capture {
326
+ Uuid : "11111111-1111-1111-1111-111111111111" ,
328
327
Event : "Download" ,
329
328
DistinctId : "123456" ,
330
329
Properties : Properties {
@@ -346,7 +345,6 @@ func TestEnqueue(t *testing.T) {
346
345
Logger : t ,
347
346
BatchSize : 1 ,
348
347
now : mockTime ,
349
- uid : mockId ,
350
348
})
351
349
defer client .Close ()
352
350
@@ -404,7 +402,6 @@ func TestCaptureWithInterval(t *testing.T) {
404
402
Verbose : true ,
405
403
Logger : t ,
406
404
now : mockTime ,
407
- uid : mockId ,
408
405
})
409
406
defer client .Close ()
410
407
@@ -441,7 +438,6 @@ func TestCaptureWithTimestamp(t *testing.T) {
441
438
Logger : t ,
442
439
BatchSize : 1 ,
443
440
now : mockTime ,
444
- uid : mockId ,
445
441
})
446
442
defer client .Close ()
447
443
@@ -475,7 +471,6 @@ func TestCaptureWithDefaultProperties(t *testing.T) {
475
471
Logger : t ,
476
472
BatchSize : 1 ,
477
473
now : mockTime ,
478
- uid : mockId ,
479
474
})
480
475
defer client .Close ()
481
476
@@ -508,7 +503,6 @@ func TestCaptureMany(t *testing.T) {
508
503
Logger : t ,
509
504
BatchSize : 3 ,
510
505
now : mockTime ,
511
- uid : mockId ,
512
506
})
513
507
defer client .Close ()
514
508
@@ -1711,7 +1705,6 @@ func TestCaptureSendFlags(t *testing.T) {
1711
1705
Logger : t ,
1712
1706
BatchSize : 1 ,
1713
1707
now : mockTime ,
1714
- uid : mockId ,
1715
1708
1716
1709
PersonalApiKey : "some very secret key" ,
1717
1710
})
0 commit comments