mirror of
https://github.com/getAlby/lndhub.go.git
synced 2026-01-06 14:35:36 +01:00
fix bugs
This commit is contained in:
@@ -90,8 +90,8 @@ func (suite *PaymentTestErrorsSuite) TestExternalFailingInvoice() {
|
||||
|
||||
//test an expired invoice
|
||||
externalInvoice := lnrpc.Invoice{
|
||||
Memo: "integration tests: external pay from alice",
|
||||
Value: int64(externalSatRequested),
|
||||
Memo: "integration tests: external pay from alice",
|
||||
Value: int64(externalSatRequested),
|
||||
Expiry: 1,
|
||||
}
|
||||
invoice, err := suite.externalLND.AddInvoice(context.Background(), &externalInvoice)
|
||||
@@ -148,10 +148,17 @@ func (suite *PaymentTestErrorsSuite) TestExternalFailingInvoice() {
|
||||
fmt.Printf("Error when getting balance %v\n", err.Error())
|
||||
}
|
||||
|
||||
// check if there are 3 transaction entries, with reversed credit and debit account ids
|
||||
assert.Equal(suite.T(), 3, len(transactonEntries))
|
||||
assert.Equal(suite.T(), transactonEntries[1].CreditAccountID, transactonEntries[2].DebitAccountID)
|
||||
assert.Equal(suite.T(), transactonEntries[1].DebitAccountID, transactonEntries[2].CreditAccountID)
|
||||
// check if there are 5 transaction entries:
|
||||
// - the incoming payment
|
||||
// - the outgoing payment
|
||||
// - the fee reserve + the fee reserve reversal
|
||||
// - the outgoing payment reversal
|
||||
// with reversed credit and debit account ids for payment 2/5 & payment 3/4
|
||||
assert.Equal(suite.T(), 5, len(transactonEntries))
|
||||
assert.Equal(suite.T(), transactonEntries[1].CreditAccountID, transactonEntries[4].DebitAccountID)
|
||||
assert.Equal(suite.T(), transactonEntries[1].DebitAccountID, transactonEntries[4].CreditAccountID)
|
||||
assert.Equal(suite.T(), transactonEntries[2].CreditAccountID, transactonEntries[3].DebitAccountID)
|
||||
assert.Equal(suite.T(), transactonEntries[2].DebitAccountID, transactonEntries[3].CreditAccountID)
|
||||
assert.Equal(suite.T(), transactonEntries[1].Amount, int64(externalSatRequested))
|
||||
assert.Equal(suite.T(), transactonEntries[2].Amount, int64(externalSatRequested))
|
||||
// assert that balance is the same
|
||||
|
||||
Reference in New Issue
Block a user