Skip to content

Commit

Permalink
Fix test "MsgMigrateContract VmError"
Browse files Browse the repository at this point in the history
  • Loading branch information
assafmo committed Jun 30, 2023
1 parent b7dc991 commit b3a0a34
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1393,11 +1393,17 @@ describe("tx.compute", () => {

expect(contract_info?.admin).toBe(secretjs.address);

tx = await secretjs.tx.compute.updateAdmin({
sender: secretjs.address,
contract_address,
new_admin: accounts[1].address,
});
tx = await secretjs.tx.compute.updateAdmin(
{
sender: secretjs.address,
contract_address,
new_admin: accounts[1].address,
},
{
broadcastCheckIntervalMs: 100,
gasLimit: 5_000_000,
},
);

if (tx.code !== TxResultCode.Success) {
console.error(tx.rawLog);
Expand Down Expand Up @@ -1462,10 +1468,16 @@ describe("tx.compute", () => {

expect(contract_info?.admin).toBe(secretjs.address);

tx = await secretjs.tx.compute.clearAdmin({
sender: secretjs.address,
contract_address,
});
tx = await secretjs.tx.compute.clearAdmin(
{
sender: secretjs.address,
contract_address,
},
{
broadcastCheckIntervalMs: 100,
gasLimit: 5_000_000,
},
);

if (tx.code !== TxResultCode.Success) {
console.error(tx.rawLog);
Expand Down Expand Up @@ -1745,7 +1757,7 @@ describe("tx.compute", () => {
);

expect(tx.rawLog).toEqual(
"failed to execute message; message index: 0: Error parsing into type ibc_hooks_contract::msg::Msg: unknown variant `yolo`, expected one of `nop`, `wrap_deposit`, `ibc_transfer`, `ibc_lifecycle_complete`: execute contract failed",
"failed to execute message; message index: 0: Error parsing into type ibc_hooks_contract::msg::MigrateMsg: unknown variant `yolo`, expected `nop` or `std_error`: migrate contract failed",
);

const { entries } = await secretjs.query.compute.contractHistory({
Expand Down

0 comments on commit b3a0a34

Please sign in to comment.