Skip to content

Commit

Permalink
Fix test condition to work on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
alpe committed Jan 7, 2021
1 parent d790dc9 commit 70f35d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/wasm/internal/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,8 @@ func TestExecuteWithPanic(t *testing.T) {
_, err = keeper.Execute(ctx, addr, fred, []byte(`{"panic":{}}`), topUp)
require.Error(t, err)
require.True(t, errors.Is(err, types.ErrExecuteFailed))
require.Equal(t, "Error calling the VM: Error executing Wasm: Wasmer runtime error: RuntimeError: unreachable: execute wasm contract failed", err.Error())
// test with contains as "Display" implementation of the Wasmer "RuntimeError" is different for Mac and Linux
assert.Contains(t, err.Error(), "Error calling the VM: Error executing Wasm: Wasmer runtime error: RuntimeError: unreachable")
}

func TestExecuteWithCpuLoop(t *testing.T) {
Expand Down

0 comments on commit 70f35d8

Please sign in to comment.