Skip to content

Commit

Permalink
fix: update tests to use updated wasm types
Browse files Browse the repository at this point in the history
  • Loading branch information
hacheigriega committed Jul 24, 2024
1 parent 2a4b9ee commit 60d34c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
12 changes: 1 addition & 11 deletions x/wasm-storage/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,6 @@ func (s *KeeperTestSuite) TestStoreOverlayWasm() {
Hash: hex.EncodeToString(crypto.Keccak256(regWasm)),
},
},
{
name: "invalid wasm type",
input: types.MsgStoreOverlayWasm{
Sender: s.authority,
Wasm: regWasm,
},
preRun: func() {},
expErr: true,
expErrMsg: "overlay Wasm type must be data-request-executor or relayer",
},
{
name: "invalid authority",
input: types.MsgStoreOverlayWasm{
Expand Down Expand Up @@ -221,7 +211,7 @@ func (s *KeeperTestSuite) TestMarshalJSON() {
Hash: "8558424e10c60eb4594cb2f1de834d5dd7a3b073d98d8641f8985fdbd84c3261",
Bytecode: []byte("test WasmTypeDataRequest"),
},
expected: `{"hash":"8558424e10c60eb4594cb2f1de834d5dd7a3b073d98d8641f8985fdbd84c3261","wasm_type":1,"bytecode":"dGVzdCBXYXNtVHlwZURhdGFSZXF1ZXN0"}`,
expected: `{"hash":"8558424e10c60eb4594cb2f1de834d5dd7a3b073d98d8641f8985fdbd84c3261","bytecode":"dGVzdCBXYXNtVHlwZURhdGFSZXF1ZXN0"}`,
},
}

Expand Down
4 changes: 2 additions & 2 deletions x/wasm-storage/keeper/querier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ func (s *KeeperTestSuite) TestOverlayWasms() {
res, err := s.queryClient.OverlayWasms(s.ctx, &req)
s.Require().NoError(err)
s.Require().NotNil(res)
s.Require().Equal(fmt.Sprintf("%s,%s", storedWasm.Hash, "WASM_TYPE_RELAYER"), res.HashTypePairs[0])
s.Require().Equal(fmt.Sprintf("%s,%s", storedWasm2.Hash, "WASM_TYPE_RELAYER"), res.HashTypePairs[1])
s.Require().Equal(fmt.Sprintf("%s,%s", storedWasm.Hash, "WASM_TYPE_DATA_REQUEST_EXECUTOR"), res.HashTypePairs[0])
s.Require().Equal(fmt.Sprintf("%s,%s", storedWasm2.Hash, "WASM_TYPE_DATA_REQUEST_EXECUTOR"), res.HashTypePairs[1])
}

0 comments on commit 60d34c4

Please sign in to comment.