From aa0896a1adc313c283fc32169fffd69f95069af8 Mon Sep 17 00:00:00 2001 From: kiwiidb Date: Thu, 10 Feb 2022 11:57:01 +0100 Subject: [PATCH] replace TODO context with Background context for integration tests --- integration_tests/incoming_payment_test.go | 2 +- integration_tests/internal_payment_test.go | 2 +- integration_tests/outgoing_payment_test.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/integration_tests/incoming_payment_test.go b/integration_tests/incoming_payment_test.go index 7ef8d10..d871fb4 100644 --- a/integration_tests/incoming_payment_test.go +++ b/integration_tests/incoming_payment_test.go @@ -106,7 +106,7 @@ func (suite *IncomingPaymentTestSuite) TestIncomingPayment() { PaymentRequest: invoiceResponse.PayReq, FeeLimit: nil, } - _, err := suite.fundingClient.SendPaymentSync(context.TODO(), &sendPaymentRequest) + _, err := suite.fundingClient.SendPaymentSync(context.Background(), &sendPaymentRequest) assert.NoError(suite.T(), err) //wait a bit for the callback event to hit diff --git a/integration_tests/internal_payment_test.go b/integration_tests/internal_payment_test.go index 88d2080..9373676 100644 --- a/integration_tests/internal_payment_test.go +++ b/integration_tests/internal_payment_test.go @@ -103,7 +103,7 @@ func (suite *PaymentTestSuite) TestInternalPayment() { PaymentRequest: invoiceResponse.PayReq, FeeLimit: nil, } - _, err := suite.fundingClient.SendPaymentSync(context.TODO(), &sendPaymentRequest) + _, err := suite.fundingClient.SendPaymentSync(context.Background(), &sendPaymentRequest) assert.NoError(suite.T(), err) //wait a bit for the callback event to hit diff --git a/integration_tests/outgoing_payment_test.go b/integration_tests/outgoing_payment_test.go index d4d44a1..596063b 100644 --- a/integration_tests/outgoing_payment_test.go +++ b/integration_tests/outgoing_payment_test.go @@ -24,7 +24,7 @@ func (suite *PaymentTestSuite) TestOutGoingPayment() { PaymentRequest: invoiceResponse.PayReq, FeeLimit: nil, } - _, err := suite.fundingClient.SendPaymentSync(context.TODO(), &sendPaymentRequest) + _, err := suite.fundingClient.SendPaymentSync(context.Background(), &sendPaymentRequest) assert.NoError(suite.T(), err) //wait a bit for the callback event to hit @@ -35,7 +35,7 @@ func (suite *PaymentTestSuite) TestOutGoingPayment() { Memo: "integration tests: external pay from alice", Value: int64(externalSatRequested), } - invoice, err := suite.fundingClient.AddInvoice(context.TODO(), &externalInvoice) + invoice, err := suite.fundingClient.AddInvoice(context.Background(), &externalInvoice) assert.NoError(suite.T(), err) //pay external from alice rec := httptest.NewRecorder()