From 60d34c418dc4c3ac46845ed925c1313991aea3f4 Mon Sep 17 00:00:00 2001 From: hacheigriega Date: Wed, 24 Jul 2024 09:58:42 -0400 Subject: [PATCH] fix: update tests to use updated wasm types --- x/wasm-storage/keeper/msg_server_test.go | 12 +----------- x/wasm-storage/keeper/querier_test.go | 4 ++-- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/x/wasm-storage/keeper/msg_server_test.go b/x/wasm-storage/keeper/msg_server_test.go index af23deb9..e57fb6db 100644 --- a/x/wasm-storage/keeper/msg_server_test.go +++ b/x/wasm-storage/keeper/msg_server_test.go @@ -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{ @@ -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"}`, }, } diff --git a/x/wasm-storage/keeper/querier_test.go b/x/wasm-storage/keeper/querier_test.go index eaa38298..04a22202 100644 --- a/x/wasm-storage/keeper/querier_test.go +++ b/x/wasm-storage/keeper/querier_test.go @@ -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]) }