Skip to content

Commit

Permalink
Refactor IBC test cases: update expected contract migrate version and…
Browse files Browse the repository at this point in the history
… required capabilities
  • Loading branch information
faddat committed Jan 12, 2025
1 parent d69bfaa commit 3ce77df
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ibc_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build cgo && !nolink_libwasmvm

package cosmwasm

import (
Expand Down Expand Up @@ -303,7 +301,7 @@ func TestAnalyzeCode(t *testing.T) {
require.NoError(t, err)
require.False(t, report.HasIBCEntryPoints)
require.Equal(t, "", report.RequiredCapabilities)
require.Equal(t, uint64(0x1a4), *report.ContractMigrateVersion)
require.Equal(t, uint64(42), *report.ContractMigrateVersion)

// Store IBC contract
wasm2, err := os.ReadFile(IBC_TEST_CONTRACT)
Expand All @@ -314,7 +312,7 @@ func TestAnalyzeCode(t *testing.T) {
report2, err := vm.AnalyzeCode(checksum2)
require.NoError(t, err)
require.True(t, report2.HasIBCEntryPoints)
require.Equal(t, "cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_3,cosmwasm_1_4,cosmwasm_2_0,cosmwasm_2_1,cosmwasm_2_2,iterator,stargate", report2.RequiredCapabilities)
require.Equal(t, "iterator,stargate", report2.RequiredCapabilities)
require.Nil(t, report2.ContractMigrateVersion)
}

Expand Down

0 comments on commit 3ce77df

Please sign in to comment.