Skip to content

Commit

Permalink
check app version from param store
Browse files Browse the repository at this point in the history
  • Loading branch information
najeal committed Jul 25, 2024
1 parent 0ffc469 commit 7dfbbb1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/test/export_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package app_test

import (
"fmt"
"testing"

"github.com/celestiaorg/celestia-app/v3/app"
Expand Down Expand Up @@ -28,7 +29,10 @@ func TestExportAppStateAndValidators(t *testing.T) {

testApp, _ := SetupTestAppWithUpgradeHeight(t, 3)
upgradeToV2(t, testApp)

ctx, err := testApp.CreateQueryContext(testApp.LastBlockHeight(), false)
require.NoError(t, err)
version := testApp.GetAppVersionFromParamStore(ctx)
fmt.Println(version)
exported, err := testApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs)
require.NoError(t, err)
assert.NotNil(t, exported)
Expand All @@ -52,4 +56,5 @@ func upgradeToV2(t *testing.T, testApp *app.App) {
testApp.EndBlock(abci.RequestEndBlock{Height: 3})
testApp.Commit()
require.EqualValues(t, 3, testApp.LastBlockHeight())
require.Equal(t, uint64(2), testApp.AppVersion())
}

0 comments on commit 7dfbbb1

Please sign in to comment.