@@ -491,7 +491,7 @@ func TestResourceInsert(t *testing.T) {
491
491
}))
492
492
r .Use (InsertedEventHandlerFunc (func (ctx context.Context , items []* Item , err * error ) {
493
493
postHook = true
494
- assert .Equal (t , []* Item {{ID : 1 }}, items )
494
+ assert .Equal (t , []* Item {{ID : 1 , ETag : "37a6259cc0c1dae299a7866489dff0bd" }}, items )
495
495
assert .NoError (t , * err )
496
496
}))
497
497
ctx := context .Background ()
@@ -518,7 +518,7 @@ func TestResourceInsertError(t *testing.T) {
518
518
}))
519
519
r .Use (InsertedEventHandlerFunc (func (ctx context.Context , items []* Item , err * error ) {
520
520
postHook = true
521
- assert .Equal (t , []* Item {{ID : 1 }}, items )
521
+ assert .Equal (t , []* Item {{ID : 1 , ETag : "37a6259cc0c1dae299a7866489dff0bd" }}, items )
522
522
assert .EqualError (t , * err , "storer error" )
523
523
}))
524
524
ctx := context .Background ()
@@ -571,7 +571,7 @@ func TestResourceInsertPostHookError(t *testing.T) {
571
571
}))
572
572
r .Use (InsertedEventHandlerFunc (func (ctx context.Context , items []* Item , err * error ) {
573
573
postHook = true
574
- assert .Equal (t , []* Item {{ID : 1 }}, items )
574
+ assert .Equal (t , []* Item {{ID : 1 , ETag : "37a6259cc0c1dae299a7866489dff0bd" }}, items )
575
575
assert .NoError (t , * err )
576
576
* err = errors .New ("post hook error" )
577
577
}))
@@ -604,7 +604,7 @@ func TestResourceUpdate(t *testing.T) {
604
604
}))
605
605
r .Use (UpdatedEventHandlerFunc (func (ctx context.Context , item * Item , origin * Item , err * error ) {
606
606
postHook = true
607
- assert .Equal (t , & Item {ID : 1 }, item )
607
+ assert .Equal (t , & Item {ID : 1 , ETag : "37a6259cc0c1dae299a7866489dff0bd" }, item )
608
608
assert .Equal (t , & Item {ID : 1 }, origin )
609
609
assert .NoError (t , * err )
610
610
}))
@@ -633,7 +633,7 @@ func TestResourceUpdateError(t *testing.T) {
633
633
}))
634
634
r .Use (UpdatedEventHandlerFunc (func (ctx context.Context , item * Item , origin * Item , err * error ) {
635
635
postHook = true
636
- assert .Equal (t , & Item {ID : 1 }, item )
636
+ assert .Equal (t , & Item {ID : 1 , ETag : "37a6259cc0c1dae299a7866489dff0bd" }, item )
637
637
assert .Equal (t , & Item {ID : 1 }, origin )
638
638
assert .EqualError (t , * err , "storer error" )
639
639
}))
@@ -691,7 +691,7 @@ func TestResourceUpdatePostHookError(t *testing.T) {
691
691
}))
692
692
r .Use (UpdatedEventHandlerFunc (func (ctx context.Context , item * Item , origin * Item , err * error ) {
693
693
postHook = true
694
- assert .Equal (t , & Item {ID : 1 }, item )
694
+ assert .Equal (t , & Item {ID : 1 , ETag : "37a6259cc0c1dae299a7866489dff0bd" }, item )
695
695
assert .Equal (t , & Item {ID : 1 }, origin )
696
696
assert .NoError (t , * err )
697
697
* err = errors .New ("post hook error" )
0 commit comments