@@ -491,7 +491,7 @@ func TestResourceInsert(t *testing.T) {
491491}))
492492r .Use (InsertedEventHandlerFunc (func (ctx context.Context , items []* Item , err * error ) {
493493postHook = true
494- assert .Equal (t , []* Item {{ID : 1 }}, items )
494+ assert .Equal (t , []* Item {{ID : 1 , ETag : "37a6259cc0c1dae299a7866489dff0bd" }}, items )
495495assert .NoError (t , * err )
496496}))
497497ctx := context .Background ()
@@ -518,7 +518,7 @@ func TestResourceInsertError(t *testing.T) {
518518}))
519519r .Use (InsertedEventHandlerFunc (func (ctx context.Context , items []* Item , err * error ) {
520520postHook = true
521- assert .Equal (t , []* Item {{ID : 1 }}, items )
521+ assert .Equal (t , []* Item {{ID : 1 , ETag : "37a6259cc0c1dae299a7866489dff0bd" }}, items )
522522assert .EqualError (t , * err , "storer error" )
523523}))
524524ctx := context .Background ()
@@ -571,7 +571,7 @@ func TestResourceInsertPostHookError(t *testing.T) {
571571}))
572572r .Use (InsertedEventHandlerFunc (func (ctx context.Context , items []* Item , err * error ) {
573573postHook = true
574- assert .Equal (t , []* Item {{ID : 1 }}, items )
574+ assert .Equal (t , []* Item {{ID : 1 , ETag : "37a6259cc0c1dae299a7866489dff0bd" }}, items )
575575assert .NoError (t , * err )
576576* err = errors .New ("post hook error" )
577577}))
@@ -604,7 +604,7 @@ func TestResourceUpdate(t *testing.T) {
604604}))
605605r .Use (UpdatedEventHandlerFunc (func (ctx context.Context , item * Item , origin * Item , err * error ) {
606606postHook = true
607- assert .Equal (t , & Item {ID : 1 }, item )
607+ assert .Equal (t , & Item {ID : 1 , ETag : "37a6259cc0c1dae299a7866489dff0bd" }, item )
608608assert .Equal (t , & Item {ID : 1 }, origin )
609609assert .NoError (t , * err )
610610}))
@@ -633,7 +633,7 @@ func TestResourceUpdateError(t *testing.T) {
633633}))
634634r .Use (UpdatedEventHandlerFunc (func (ctx context.Context , item * Item , origin * Item , err * error ) {
635635postHook = true
636- assert .Equal (t , & Item {ID : 1 }, item )
636+ assert .Equal (t , & Item {ID : 1 , ETag : "37a6259cc0c1dae299a7866489dff0bd" }, item )
637637assert .Equal (t , & Item {ID : 1 }, origin )
638638assert .EqualError (t , * err , "storer error" )
639639}))
@@ -691,7 +691,7 @@ func TestResourceUpdatePostHookError(t *testing.T) {
691691}))
692692r .Use (UpdatedEventHandlerFunc (func (ctx context.Context , item * Item , origin * Item , err * error ) {
693693postHook = true
694- assert .Equal (t , & Item {ID : 1 }, item )
694+ assert .Equal (t , & Item {ID : 1 , ETag : "37a6259cc0c1dae299a7866489dff0bd" }, item )
695695assert .Equal (t , & Item {ID : 1 }, origin )
696696assert .NoError (t , * err )
697697* err = errors .New ("post hook error" )
0 commit comments