From 33b7b9221a84143ad6093dd1772cce32c489220c Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Fri, 10 Feb 2023 09:01:39 +0200 Subject: [PATCH] channeldb+wtdb: fix migration function name lint Rename the ApplyMigrationWithDb function to ApplyMigrationWithDB to make the linter happy. --- channeldb/migration30/migration_test.go | 4 ++-- channeldb/migtest/migtest.go | 4 ++-- watchtower/wtdb/migration4/client_db_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/channeldb/migration30/migration_test.go b/channeldb/migration30/migration_test.go index 5ec91fdff..a97a4aea5 100644 --- a/channeldb/migration30/migration_test.go +++ b/channeldb/migration30/migration_test.go @@ -103,7 +103,7 @@ func TestMigrateRevocationLog(t *testing.T) { return nil } - migtest.ApplyMigrationWithDb( + migtest.ApplyMigrationWithDB( t, beforeMigration, afterMigration, @@ -560,7 +560,7 @@ func BenchmarkMigration(b *testing.B) { } // Run the migration test. - migtest.ApplyMigrationWithDb( + migtest.ApplyMigrationWithDB( b, beforeMigration, nil, diff --git a/channeldb/migtest/migtest.go b/channeldb/migtest/migtest.go index dacca7dac..efe058287 100644 --- a/channeldb/migtest/migtest.go +++ b/channeldb/migtest/migtest.go @@ -84,12 +84,12 @@ func ApplyMigration(t *testing.T, } } -// ApplyMigrationWithDb is a helper test function that encapsulates the general +// ApplyMigrationWithDB is a helper test function that encapsulates the general // steps which are needed to properly check the result of applying migration // function. This function differs from ApplyMigration as it requires the // supplied migration functions to take a db instance and construct their own // database transactions. -func ApplyMigrationWithDb(t testing.TB, beforeMigration, afterMigration, +func ApplyMigrationWithDB(t testing.TB, beforeMigration, afterMigration, migrationFunc func(db kvdb.Backend) error, shouldFail bool) { t.Helper() diff --git a/watchtower/wtdb/migration4/client_db_test.go b/watchtower/wtdb/migration4/client_db_test.go index 2cdb7c4e9..cb0feec68 100644 --- a/watchtower/wtdb/migration4/client_db_test.go +++ b/watchtower/wtdb/migration4/client_db_test.go @@ -237,7 +237,7 @@ func TestMigrateAckedUpdates(t *testing.T) { // summary bucket and a new index bucket. after := after(test.shouldFail, test.pre, test.post) - migtest.ApplyMigrationWithDb( + migtest.ApplyMigrationWithDB( t, before, after, MigrateAckedUpdates(2), test.shouldFail, )