multi: thread context through InitPayment
This commit is contained in:
9 files changed
+46
-39
No files matched your search
@@ -81,7 +81,7 @@ func TestControlTowerSubscribeSuccess(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
err = pControl.InitPayment(info.PaymentIdentifier, info)
|
||||
err = pControl.InitPayment(t.Context(), info.PaymentIdentifier, info)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -212,7 +212,7 @@ func TestKVStoreSubscribeAllSuccess(t *testing.T) {
|
||||
info1, attempt1, preimg1, err := genInfo()
|
||||
require.NoError(t, err)
|
||||
|
||||
err = pControl.InitPayment(info1.PaymentIdentifier, info1)
|
||||
err = pControl.InitPayment(t.Context(), info1.PaymentIdentifier, info1)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Subscription should succeed and immediately report the Initiated
|
||||
@@ -228,7 +228,7 @@ func TestKVStoreSubscribeAllSuccess(t *testing.T) {
|
||||
info2, attempt2, preimg2, err := genInfo()
|
||||
require.NoError(t, err)
|
||||
|
||||
err = pControl.InitPayment(info2.PaymentIdentifier, info2)
|
||||
err = pControl.InitPayment(t.Context(), info2.PaymentIdentifier, info2)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Register an attempt on the second payment.
|
||||
@@ -337,7 +337,7 @@ func TestKVStoreSubscribeAllImmediate(t *testing.T) {
|
||||
info, attempt, _, err := genInfo()
|
||||
require.NoError(t, err)
|
||||
|
||||
err = pControl.InitPayment(info.PaymentIdentifier, info)
|
||||
err = pControl.InitPayment(t.Context(), info.PaymentIdentifier, info)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Register a payment update.
|
||||
@@ -392,7 +392,7 @@ func TestKVStoreUnsubscribeSuccess(t *testing.T) {
|
||||
info, attempt, _, err := genInfo()
|
||||
require.NoError(t, err)
|
||||
|
||||
err = pControl.InitPayment(info.PaymentIdentifier, info)
|
||||
err = pControl.InitPayment(t.Context(), info.PaymentIdentifier, info)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Assert all subscriptions receive the update.
|
||||
@@ -465,7 +465,7 @@ func testKVStoreSubscribeFail(t *testing.T, registerAttempt,
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
err = pControl.InitPayment(info.PaymentIdentifier, info)
|
||||
err = pControl.InitPayment(t.Context(), info.PaymentIdentifier, info)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user