1- // Copyright © 2021 Kaleido, Inc.
1+ // Copyright © 2025 Kaleido, Inc.
22//
33// SPDX-License-Identifier: Apache-2.0
44//
@@ -142,7 +142,7 @@ func TestInitMissingURL(t *testing.T) {
142142
143143func opAcker () func (args mock.Arguments ) {
144144 return func (args mock.Arguments ) {
145- args [0 ].(* core.OperationUpdate ).OnComplete ()
145+ args [0 ].(* core.OperationUpdateAsync ).OnComplete ()
146146 }
147147}
148148
@@ -492,7 +492,7 @@ func TestMessageEventsBackgroundStart(t *testing.T) {
492492 assert .NoError (t , err )
493493
494494 namespacedID1 := fmt .Sprintf ("ns1:%s" , fftypes .NewUUID ())
495- ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdate ) bool {
495+ ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdateAsync ) bool {
496496 return ev .NamespacedOpID == namespacedID1 &&
497497 ev .Status == core .OpStatusFailed &&
498498 ev .ErrorMessage == "pop" &&
@@ -503,7 +503,7 @@ func TestMessageEventsBackgroundStart(t *testing.T) {
503503 assert .Equal (t , `{"action":"ack","id":"1"}` , string (msg ))
504504
505505 namespacedID2 := fmt .Sprintf ("ns1:%s" , fftypes .NewUUID ())
506- ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdate ) bool {
506+ ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdateAsync ) bool {
507507 return ev .NamespacedOpID == namespacedID2 &&
508508 ev .Status == core .OpStatusSucceeded &&
509509 ev .Plugin == "ffdx"
@@ -513,7 +513,7 @@ func TestMessageEventsBackgroundStart(t *testing.T) {
513513 assert .Equal (t , `{"action":"ack","id":"2"}` , string (msg ))
514514
515515 namespacedID3 := fmt .Sprintf ("ns1:%s" , fftypes .NewUUID ())
516- ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdate ) bool {
516+ ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdateAsync ) bool {
517517 return ev .NamespacedOpID == namespacedID3 &&
518518 ev .Status == core .OpStatusSucceeded &&
519519 ev .DXManifest == `{"manifest":true}` &&
@@ -552,7 +552,7 @@ func TestMessageEvents(t *testing.T) {
552552 assert .NoError (t , err )
553553
554554 namespacedID1 := fmt .Sprintf ("ns1:%s" , fftypes .NewUUID ())
555- ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdate ) bool {
555+ ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdateAsync ) bool {
556556 return ev .NamespacedOpID == namespacedID1 &&
557557 ev .Status == core .OpStatusFailed &&
558558 ev .ErrorMessage == "pop" &&
@@ -563,7 +563,7 @@ func TestMessageEvents(t *testing.T) {
563563 assert .Equal (t , `{"action":"ack","id":"1"}` , string (msg ))
564564
565565 namespacedID2 := fmt .Sprintf ("ns1:%s" , fftypes .NewUUID ())
566- ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdate ) bool {
566+ ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdateAsync ) bool {
567567 return ev .NamespacedOpID == namespacedID2 &&
568568 ev .Status == core .OpStatusSucceeded &&
569569 ev .Plugin == "ffdx"
@@ -573,7 +573,7 @@ func TestMessageEvents(t *testing.T) {
573573 assert .Equal (t , `{"action":"ack","id":"2"}` , string (msg ))
574574
575575 namespacedID3 := fmt .Sprintf ("ns1:%s" , fftypes .NewUUID ())
576- ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdate ) bool {
576+ ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdateAsync ) bool {
577577 return ev .NamespacedOpID == namespacedID3 &&
578578 ev .Status == core .OpStatusSucceeded &&
579579 ev .DXManifest == `{"manifest":true}` &&
@@ -617,7 +617,7 @@ func TestBlobEvents(t *testing.T) {
617617 assert .NoError (t , err )
618618
619619 namespacedID5 := fmt .Sprintf ("ns1:%s" , fftypes .NewUUID ())
620- ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdate ) bool {
620+ ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdateAsync ) bool {
621621 return ev .NamespacedOpID == namespacedID5 &&
622622 ev .Status == core .OpStatusFailed &&
623623 ev .ErrorMessage == "pop" &&
@@ -628,7 +628,7 @@ func TestBlobEvents(t *testing.T) {
628628 assert .Equal (t , `{"action":"ack","id":"5"}` , string (msg ))
629629
630630 namespacedID6 := fmt .Sprintf ("ns1:%s" , fftypes .NewUUID ())
631- ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdate ) bool {
631+ ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdateAsync ) bool {
632632 return ev .NamespacedOpID == namespacedID6 &&
633633 ev .Status == core .OpStatusSucceeded &&
634634 ev .Output .String () == `{"some":"details"}` &&
@@ -650,7 +650,7 @@ func TestBlobEvents(t *testing.T) {
650650 assert .Equal (t , `{"action":"ack","id":"9"}` , string (msg ))
651651
652652 namespacedID10 := fmt .Sprintf ("ns1:%s" , fftypes .NewUUID ())
653- ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdate ) bool {
653+ ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdateAsync ) bool {
654654 return ev .NamespacedOpID == namespacedID10 &&
655655 ev .Status == core .OpStatusSucceeded &&
656656 ev .Output .String () == `{"signatures":"and stuff"}` &&
@@ -683,7 +683,7 @@ func TestEventsWithManifest(t *testing.T) {
683683 h .SetOperationHandler ("ns1" , ocb )
684684
685685 namespacedID1 := fmt .Sprintf ("ns1:%s" , fftypes .NewUUID ())
686- ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdate ) bool {
686+ ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdateAsync ) bool {
687687 return ev .NamespacedOpID == namespacedID1 &&
688688 ev .Status == core .OpStatusPending &&
689689 ev .Plugin == "ffdx"
@@ -693,7 +693,7 @@ func TestEventsWithManifest(t *testing.T) {
693693 assert .Equal (t , `{"action":"ack","id":"1"}` , string (msg ))
694694
695695 namespacedID2 := fmt .Sprintf ("ns1:%s" , fftypes .NewUUID ())
696- ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdate ) bool {
696+ ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdateAsync ) bool {
697697 return ev .NamespacedOpID == namespacedID2 &&
698698 ev .Status == core .OpStatusPending &&
699699 ev .Plugin == "ffdx"
0 commit comments