From af9876dacd259d820b73c247d16aff195deaad5d Mon Sep 17 00:00:00 2001 From: Pantani Date: Tue, 27 Jun 2023 19:55:06 +0200 Subject: [PATCH] fix wrong keeper arg pointer --- .../keeper/msg_server_{{typeName}}_test.go.plush | 6 +++--- .../x/{{moduleName}}/keeper/{{typeName}}_test.go.plush | 2 +- .../keeper/msg_server_{{typeName}}_test.go.plush | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ignite/templates/typed/map/files/tests/messages/x/{{moduleName}}/keeper/msg_server_{{typeName}}_test.go.plush b/ignite/templates/typed/map/files/tests/messages/x/{{moduleName}}/keeper/msg_server_{{typeName}}_test.go.plush index 0996c1d439..1997820002 100644 --- a/ignite/templates/typed/map/files/tests/messages/x/{{moduleName}}/keeper/msg_server_{{typeName}}_test.go.plush +++ b/ignite/templates/typed/map/files/tests/messages/x/{{moduleName}}/keeper/msg_server_{{typeName}}_test.go.plush @@ -18,7 +18,7 @@ var _ = strconv.IntSize func Test<%= TypeName.UpperCamel %>MsgServerCreate(t *testing.T) { k, ctx := keepertest.<%= title(ModuleName) %>Keeper(t) - srv := keeper.NewMsgServerImpl(*k) + srv := keeper.NewMsgServerImpl(k) wctx := sdk.WrapSDKContext(ctx) <%= MsgSigner.LowerCamel %> := "A" for i := 0; i < 5; i++ { @@ -72,7 +72,7 @@ func Test<%= TypeName.UpperCamel %>MsgServerUpdate(t *testing.T) { for _, tc := range tests { t.Run(tc.desc, func(t *testing.T) { k, ctx := keepertest.<%= title(ModuleName) %>Keeper(t) - srv := keeper.NewMsgServerImpl(*k) + srv := keeper.NewMsgServerImpl(k) wctx := sdk.WrapSDKContext(ctx) expected := &types.MsgCreate<%= TypeName.UpperCamel %>{<%= MsgSigner.UpperCamel %>: <%= MsgSigner.LowerCamel %>, <%= for (i, index) in Indexes { %><%= index.Name.UpperCamel %>: <%= index.ValueIndex() %>, @@ -132,7 +132,7 @@ func Test<%= TypeName.UpperCamel %>MsgServerDelete(t *testing.T) { for _, tc := range tests { t.Run(tc.desc, func(t *testing.T) { k, ctx := keepertest.<%= title(ModuleName) %>Keeper(t) - srv := keeper.NewMsgServerImpl(*k) + srv := keeper.NewMsgServerImpl(k) wctx := sdk.WrapSDKContext(ctx) _, err := srv.Create<%= TypeName.UpperCamel %>(wctx, &types.MsgCreate<%= TypeName.UpperCamel %>{<%= MsgSigner.UpperCamel %>: <%= MsgSigner.LowerCamel %>, diff --git a/ignite/templates/typed/singleton/files/component/x/{{moduleName}}/keeper/{{typeName}}_test.go.plush b/ignite/templates/typed/singleton/files/component/x/{{moduleName}}/keeper/{{typeName}}_test.go.plush index c2ed94e04b..52779b13ae 100644 --- a/ignite/templates/typed/singleton/files/component/x/{{moduleName}}/keeper/{{typeName}}_test.go.plush +++ b/ignite/templates/typed/singleton/files/component/x/{{moduleName}}/keeper/{{typeName}}_test.go.plush @@ -12,7 +12,7 @@ import ( "<%= ModulePath %>/testutil/nullify" ) -func createTest<%= TypeName.UpperCamel %>(keeper *keeper.Keeper, ctx sdk.Context) types.<%= TypeName.UpperCamel %> { +func createTest<%= TypeName.UpperCamel %>(keeper keeper.Keeper, ctx sdk.Context) types.<%= TypeName.UpperCamel %> { item := types.<%= TypeName.UpperCamel %>{} keeper.Set<%= TypeName.UpperCamel %>(ctx, item) return item diff --git a/ignite/templates/typed/singleton/files/messages/x/{{moduleName}}/keeper/msg_server_{{typeName}}_test.go.plush b/ignite/templates/typed/singleton/files/messages/x/{{moduleName}}/keeper/msg_server_{{typeName}}_test.go.plush index d5c4ca61fc..203de98691 100644 --- a/ignite/templates/typed/singleton/files/messages/x/{{moduleName}}/keeper/msg_server_{{typeName}}_test.go.plush +++ b/ignite/templates/typed/singleton/files/messages/x/{{moduleName}}/keeper/msg_server_{{typeName}}_test.go.plush @@ -14,7 +14,7 @@ import ( func Test<%= TypeName.UpperCamel %>MsgServerCreate(t *testing.T) { k, ctx := keepertest.<%= title(ModuleName) %>Keeper(t) - srv := keeper.NewMsgServerImpl(*k) + srv := keeper.NewMsgServerImpl(k) wctx := sdk.WrapSDKContext(ctx) <%= MsgSigner.LowerCamel %> := "A" expected := &types.MsgCreate<%= TypeName.UpperCamel %>{<%= MsgSigner.UpperCamel %>: <%= MsgSigner.LowerCamel %>} @@ -46,7 +46,7 @@ func Test<%= TypeName.UpperCamel %>MsgServerUpdate(t *testing.T) { for _, tc := range tests { t.Run(tc.desc, func(t *testing.T) { k, ctx := keepertest.<%= title(ModuleName) %>Keeper(t) - srv := keeper.NewMsgServerImpl(*k) + srv := keeper.NewMsgServerImpl(k) wctx := sdk.WrapSDKContext(ctx) expected := &types.MsgCreate<%= TypeName.UpperCamel %>{<%= MsgSigner.UpperCamel %>: <%= MsgSigner.LowerCamel %>} _, err := srv.Create<%= TypeName.UpperCamel %>(wctx, expected) @@ -86,7 +86,7 @@ func Test<%= TypeName.UpperCamel %>MsgServerDelete(t *testing.T) { for _, tc := range tests { t.Run(tc.desc, func(t *testing.T) { k, ctx := keepertest.<%= title(ModuleName) %>Keeper(t) - srv := keeper.NewMsgServerImpl(*k) + srv := keeper.NewMsgServerImpl(k) wctx := sdk.WrapSDKContext(ctx) _, err := srv.Create<%= TypeName.UpperCamel %>(wctx, &types.MsgCreate<%= TypeName.UpperCamel %>{<%= MsgSigner.UpperCamel %>: <%= MsgSigner.LowerCamel %>})