channeldb/migrations_test: touch up docs

This commit is contained in:
Conner Fromknecht 2018-08-10 14:31:29 -07:00
parent 93e5f9a545
commit 3a579f3305
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -5,14 +5,16 @@ import (
"testing" "testing"
) )
// TestPaymentStatusesMigration checks that already completed payments will have
// their payment statuses set to Completed after the migration.
func TestPaymentStatusesMigration(t *testing.T) { func TestPaymentStatusesMigration(t *testing.T) {
t.Parallel() t.Parallel()
fakePayment := makeFakePayment() fakePayment := makeFakePayment()
paymentHash := sha256.Sum256(fakePayment.PaymentPreimage[:]) paymentHash := sha256.Sum256(fakePayment.PaymentPreimage[:])
// Add fake payment to the test database and verifies that it was created // Add fake payment to test database, verifying that it was created,
// and there is only one payment and its status is not "Completed". // that we have only one payment, and its status is not "Completed".
beforeMigrationFunc := func(d *DB) { beforeMigrationFunc := func(d *DB) {
if err := d.AddPayment(fakePayment); err != nil { if err := d.AddPayment(fakePayment); err != nil {
t.Fatalf("unable to add payment: %v", err) t.Fatalf("unable to add payment: %v", err)
@ -40,8 +42,8 @@ func TestPaymentStatusesMigration(t *testing.T) {
} }
} }
// Verify that was created payment status "Completed" for our one fake // Verify that the created payment status is "Completed" for our one
// payment. // fake payment.
afterMigrationFunc := func(d *DB) { afterMigrationFunc := func(d *DB) {
meta, err := d.FetchMeta(nil) meta, err := d.FetchMeta(nil)
if err != nil { if err != nil {