From 67cad54a5c1a1b46b599e74f56c664e3cee214aa Mon Sep 17 00:00:00 2001 From: lumtis Date: Mon, 22 Jan 2024 09:56:22 -0800 Subject: [PATCH] test for new migration function --- x/observer/migrations/v5/migrate_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/x/observer/migrations/v5/migrate_test.go b/x/observer/migrations/v5/migrate_test.go index d97b3dde69..e4667153bf 100644 --- a/x/observer/migrations/v5/migrate_test.go +++ b/x/observer/migrations/v5/migrate_test.go @@ -41,6 +41,14 @@ func TestMigrateObserverMapper(t *testing.T) { } assert.Equal(t, 0, len(observerMappers)) }) + + t.Run("TestMigrateStoreNoObserverMapper", func(t *testing.T) { + k, ctx := keepertest.ObserverKeeper(t) + err := v5.MigrateObserverMapper(ctx, k.StoreKey(), k.Codec()) + assert.NoError(t, err) + _, found := k.GetObserverSet(ctx) + assert.False(t, found) + }) } func TestMigrateObserverParams(t *testing.T) {