test: update itest to no longer expect incorrect message for sphinx replay test

In this commit, we update the itests to expect the correct message for
the sphinx replay test. Before the fixes in the prior commits, we
expected the wrong error since we were actually unable to decrypt these
converted malformed HTLC errors. Now, we'll properly return a parse able
error, so we assert against that error instead of the failure to decode
an error.
This commit is contained in:
Olaoluwa Osuntokun 2019-04-30 18:30:24 -07:00
parent 56c969c911
commit 2f2a907b58
No known key found for this signature in database
GPG Key ID: CE58F7F8E20FD9A2

@ -3522,13 +3522,10 @@ func testSphinxReplayPersistence(net *lntest.NetworkHarness, t *harnessTest) {
// Construct the response we expect after sending a duplicate packet // Construct the response we expect after sending a duplicate packet
// that fails due to sphinx replay detection. // that fails due to sphinx replay detection.
replayErr := fmt.Sprintf("unable to route payment to destination: "+ replayErr := "TemporaryChannelFailure"
"TemporaryChannelFailure: unable to de-obfuscate onion failure, "+ if !strings.Contains(resp.PaymentError, replayErr) {
"htlc with hash(%x): unable to retrieve onion failure", t.Fatalf("received payment error: %v, expected %v",
invoiceResp.RHash) resp.PaymentError, replayErr)
if resp.PaymentError != replayErr {
t.Fatalf("received payment error: %v", resp.PaymentError)
} }
// Since the payment failed, the balance should still be left // Since the payment failed, the balance should still be left